On Tue, 12 Feb 2019, H.J. Lu wrote: > > > Prune joined switches with negation to allow -march=skylake-avx512 to > > > override previous -march=native on command-line. > > > > > > PR driver/69471 > > > * opts-common.c (prune_options): Also prune joined switches > > > with negation. > > > * config/i386/i386.opt (march=): Add Negative(march=). > > > (mtune=): Add Negative(mtune=). > > > > Here is the updated patch. > > > > PING: > > https://gcc.gnu.org/ml/gcc-patches/2019-02/msg00492.html
I think this is changing architecture-independent code in a way that is not clearly safe based on the architecture-independent options design, in order to address an architecture-specific problem. The exclusion of joined switches is presumably aimed at such switches that can be used multiple times with different arguments, with different semantics to just using them once (e.g. -I). Is there any reason such an option should not have a negative form? I think anything like this (would not be suitable for the current development stage and) would need a more detailed analysis of what existing options might be affected by the change and why it's OK for them, as well as updates to options.texi to discuss this issue with the semantics of Negative and kinds of options it cannot be used with. -- Joseph S. Myers jos...@codesourcery.com