https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77475
Bug ID: 77475
Summary: unnecessary or misleading context in reporting command
line problems
Product: gcc
Version: 7.0
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: driver
Assignee: unassigned at gcc dot gnu.org
Reporter: drepper.fsp+rhbz at gmail dot com
Target Milestone: ---
When specifying a wrong command line option gcc reports the error as being on
the first line of the file and also prints that line. This can be confusing.
$ cat u.c
this is garbage
$ local-gcc -c -mmemset-strategy=wrong u.c
u.c:1:0: error: wrong arg wrong to option -mmemset_strategy=
this is garbage
$ local-gcc -c -march=wrong u.c
u.c:1:0: error: bad value (wrong) for -march= switch
this is garbage
The message should ideally not include any file information and especially not
line from the input file should be printed, it has nothing to do with the
error.