-freflection is unusable without C++26 so let's not allow it.
PR c++/124447
gcc/c-family/ChangeLog:
* c-opts.cc (c_common_post_options): Error if -freflection is used
without -std=c++26 or -std=gnu++26.
Reviewed-by: Jason Merrill <jason@redhat.com>
if (flag_immediate_escalation && cxx_dialect < cxx20)
flag_immediate_escalation = 0;
+ if (flag_reflection && cxx_dialect < cxx26)
+ error ("%<-freflection%> only supported with %<-std=c++26%> or "
+ "%<-std=gnu++26%>");
+
if (num_in_fnames > 1)
error ("too many filenames given; type %<%s %s%> for usage",
progname, "--help");