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

            Bug ID: 115440
           Summary: unrecognized command-line option '--c++17'; did you
                    mean '--stdc++17'?
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: driver
          Assignee: unassigned at gcc dot gnu.org
          Reporter: arthur.j.odwyer at gmail dot com
  Target Milestone: ---

This is merely a very minor glitch in an error message. But I keep noticing it
when I accidentally use an EDG-style "--c++11, --c++14, ..." option with GCC
instead of the correct "-std=c++11, -std=c++14, ...".

% g++ --c++17 test.cpp
g++: error: unrecognized command-line option '--c++17'; did you mean
'--stdc++17'?
% g++ --stdc++17 test.cpp
g++: error: unrecognized command-line option '--stdc++17'

Instead of "--stdc++XX" it should be suggesting "-std=c++17" (one dash, equals
sign).  (Two dashes "--std=c++XX" does also work, but ~nobody writes that in
real life, so I don't think the driver should suggest that anybody start.)

Reply via email to