This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
egcs, cp/lex.c warning confusion ...
- To: egcs at cygnus dot com
- Subject: egcs, cp/lex.c warning confusion ...
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Date: Mon, 2 Mar 1998 14:25:17 -0500 (EST)
In egcs/cp/lex.c a warning is elicited for the following line 2990:
> if (parsing && yychar == '(' || yychar == LEFT_RIGHT)
> lex.c: In function `do_scoped_id':
> lex.c:2990: warning: suggest parentheses around && within ||
I'm wondering what the proper way to parenthesize this expression is.
Preserving the current behavior would mean doing this:
> if ((parsing && yychar == '(') || yychar == LEFT_RIGHT)
However I happened to notice on line 2860 that a similar
comparison explicitly uses a different order of precedence.
> else if (parsing && (yychar == '(' || yychar == LEFT_RIGHT))
Obviously, they may not be related. Would someone who is
familiar with the code please explain a proper solution?
Thanks,
--Kaveh
--
Kaveh R. Ghazi Project Manager / Custom Development
ghazi@caip.rutgers.edu ICon CMT Corp.