Hi! 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.
Bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk. 2025-12-19 Jakub Jelinek <[email protected]> * dump-parse-tree.cc (show_omp_clauses): Add default: with gcc_unreachable () to avoid spurious -Wmaybe-uninitialized warnings. --- gcc/fortran/dump-parse-tree.cc.jj 2025-12-19 10:06:14.000000000 +0100 +++ gcc/fortran/dump-parse-tree.cc 2025-12-19 12:53:57.794080313 +0100 @@ -1994,7 +1994,9 @@ show_omp_clauses (gfc_omp_clauses *omp_c 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); Jakub
