While the enum has only 4 enumerators and all of them are listed, in theory values
with the enum type could contain other values and so without default:
-Wmaybe-uninitialized warning for the s variable can happen.
2025-12-19 Jakub Jelinek <jakub@redhat.com>
* dump-parse-tree.cc (show_omp_clauses): Add default: with
gcc_unreachable () to avoid spurious -Wmaybe-uninitialized warnings.
case OMP_DEVICE_TYPE_HOST: s = "host"; break;
case OMP_DEVICE_TYPE_NOHOST: s = "nohost"; break;
case OMP_DEVICE_TYPE_ANY: s = "any"; break;
- case OMP_DEVICE_TYPE_UNSET: gcc_unreachable ();
+ case OMP_DEVICE_TYPE_UNSET:
+ default:
+ gcc_unreachable ();
}
fputs (" DEVICE_TYPE(", dumpfile);
fputs (s, dumpfile);