On Sat, 29 Oct 2011, Richard Guenther wrote: > I tried to look at what we get for -fno-pic vs. -fpic and -fno-pic is > completely > dropped from the decoded options list (not sure what happens on targets > with -fpic as default). So it seems at most one state (the non-default one) > survives here.
I don't see where that would happening, and don't see that myself; -fno-pic gets included in COLLECT_GCC_OPTIONS for me if it's the last -fpic/-fno-pic option on the driver command line. > But maybe I'm missing something - how can I reliably check if there is > a negative form of an option, and if, if the option is the negative form? The "value" field of a cl_decoded_option is 1 for a positive option, 0 for the negative form, for an option accepting positive and negative forms (not marked with RejectNegative / CL_REJECT_NEGATIVE. (It's a bug if an option allows a negative form but also takes a UInteger argument, since such an argument also uses the "value" field.) -- Joseph S. Myers jos...@codesourcery.com