This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: tradtradcpp0, cpp spec bugs, and use of '|'


Chris G. Demetriou wrote:-

> --- 5900,5913 ----
>     if (*p == '!')
>       ++p;
>   
> + next_member:
> +   suffix = 0;
> + 
>     if (*p == '.')
>       suffix = 1, ++p;
>   
>     filter = p;
> !   while (*p != ':' && *p != '}' && *p != '|')
>       p++;
>   
>     if (suffix)

Hi Chris,

Specs are real voodoo.  The docs read

 %{S|P:X} substitutes X if either -S or -P was given to CC.  This may be
	  combined with ! and . as above binding stronger than the OR.
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

so I think your loop should also involve the check for '!' a couple of
lines above.  Otherwise, it looks OK to me.

Clearly no-one uses this stuff, otherwise it would have come up.  That
makes me think it'll be OK to change the meaning of '|' to "any of"
from "for each of".

I'd appreciate some comments from specs gurus, too.

Neil.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]