On Mon, Jan 21, 2019 at 12:31 PM Ulrich Drepper <drep...@redhat.com> wrote: > > There is a problem with parsing the second part of the -fopt-info > command line parameter in case there is an equal sign followed by a > filename with a dash: > > $ g++ -c -O -fopt-info-all=some-file u.cc > cc1plus: warning: unknown option ‘all=some’ in ‘-fopt-info-all=some-file’ > cc1plus: error: unrecognized command line option ‘-fopt-info-all=some-file’ > > The code looks for a '-' and a '=' concurrently but does not ignore the > '-' if it is part of the filename specified after the '='. The patch > below fixes this. I also changed the second 'if' into 'else if' which > is clearly always the case but the current code makes it unnecessarily > cumbersome to understand. > > This is a highly annoying bug in the right circumstance. I have file > names generated based in the source file name and those include in some > situations dashes. > > OK for trunk?
OK. Richard. > > gcc/ChangeLog > 2019-01-21 Ulrich Drepper <drep...@redhat.com> > > * dumpfile.c (opt_info_switch_p_1): Ignore '-' if it appears > after the '='. > >