On Sat, Oct 29, 2016 at 12:09 PM, Jakub Jelinek <ja...@redhat.com> wrote:
> Apparently the driver reorders the options, -std=* options come before
> all -f* options, so both of the following patches work the same, except
> when cc1plus is invoked by hand.  The first (inlined) patch solves it
> more in line how e.g. -fgnu-keywords and similar options are handled, so I 
> think
> it is preferable (and I've successfully bootstrapped/regtested it on
> x86_64-linux and i686-linux).  The second (attached) patch handles it
> by not clearing -fext-numeric-literals during option processing
> for -std=* options, just in post option handling clears it for the
> strict c++11+ modes if the option is not specified explicitly.
> If the driver wouldn't reorder the options, it would handle better
> cases like -fext-numeric-literals -std=c++11 to mean the same thing
> as -std=c++11 -fext-numeric-literals etc., but due to the reordering
> it isn't needed and for consistency we'd also need to change -fgnu-keywords
> etc.

I lean toward the second patch because it keeps the logic in a single
place, but it looks like it doesn't currently handle C++98
differently.  I don't think we need to change the handling of other
options to match.

Jason

Reply via email to