https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82063
--- Comment #4 from Manuel López-Ibáñez <manu at gcc dot gnu.org> --- (In reply to jim.wilson from comment #2) > I did already look at examples, and read the docs, and step through > code in the debugger. Posarg and negarg are integers, which are > ignored for options that take a string as an argument. So no, this > doesn't work. Ah, yes you are right! > Note in optc-gen.awk, where the handle_generated_option call is > generated, the fourth argument is always NULL. This is "const char > *arg" which is the argument for options that take string arguments. > The fifth argument, int value, is where the posarg/negarg value gets > passed. Also, note, in the file opts-common.c, in the function > set_options, in the case CLVC_STRING, it uses only arg, it does not > use value. Since the posarg/negarg values end up in value here, they > are ignored, and are useless. It should be possible to change the behavior to adjust handle_generated_option according to CLVC_STRING. Alternatively, we could actually have overloads of handle_generated_option() so that it does the right thing independently of what is passed. The above seems a bug on its own independent of -Walloc-alloc-size-larger-than=.