https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91130

--- Comment #20 from Richard Earnshaw <rearnsha at gcc dot gnu.org> ---
Running under gdb I see:
(gdb) 
decode_cmdline_option (argv=0x15170c, lang_mask=4095, decoded=0x1506e8)
    at /home/rearnsha/gnusrc/gcc/gcc-9.1.0/gcc/opts-common.c:523
...
gdb) p *option
$5 = {opt_text = 0xb7484 "-MMD", 
  help = 0xb748c "Like -MD but ignore system header files.", 
  missing_argument_error = 0xb6aa4 "missing filename after %qs", 
  warn_message = 0x0, alias_arg = 0x0, neg_alias_arg = 0x0, 
  alias_target = 1451, back_chain = 1451, opt_len = 3 '\003', neg_index = -1, 
  flags = 8391920, cl_disabled = 0, cl_separate_nargs = 0, 
  cl_separate_alias = 0, cl_negative_alias = 0, cl_no_driver_arg = 1, 
  cl_reject_driver = 0, cl_reject_negative = 0, cl_missing_ok = 0, 
  cl_uinteger = 0, cl_host_wide_int = 0, cl_tolower = 0, cl_report = 0, 
  cl_byte_size = 0, flag_var_offset = 65535, var_enum = 0, 
  var_type = CLVC_STRING, var_value = 0, range_min = -1, range_max = -1}
...
(gdb) p separate_arg_flag
$6 = true

The result is that -MMD swallows the subsequent -MF flag as it's own argument
and aaaa leaks through as a file to process

Reply via email to