On Wed, May 30, 2012 at 1:39 PM, Steve Ellcey <sell...@mips.com> wrote: >
> My question is: When checking the value of TARGET_SYNCI is there anyway > to tell if the flag was set explicitly by the user or implicitly by > the compiler? The reason I want to know is that if I build GCC for MIPS > today and configure with --with-synci then some tests fail because > the test specifies an old MIPS architecture that doesn't support synci > and the test prints a warning: > > if (TARGET_SYNCI && !ISA_HAS_SYNCI) > { > warning (0, "the %qs architecture does not support the synci " > "instruction", mips_arch_info->name); > target_flags &= ~MASK_SYNCI; > } > > Ideally, this warning should only be printed if the user explicitly asked > for -msynci, not if -msynci was merely set as the default. But I am not sure > how to tell the difference between those two situations. I think you want to examine target_flags_explicit. - David