This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/15682] New: Parser does not report error when *+ are used together in an exp.
- From: "u_238 at hotmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 May 2004 14:40:54 -0000
- Subject: [Bug c/15682] New: Parser does not report error when *+ are used together in an exp.
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
I was writing a small program(Prog1.c) given below.I compiled this on linux9.0
using the gcc compiler 3.2.2.
Prog1.c
main()
{
int a = 1 *+ 1;
}
Here *+ are used together which is illegal since no *+ operator exists and as
C/C++ parser works on maximum-munching rule ..it should report an error.
Actually, here the compiler is treating *+ as binary operator * followed
by a unary operator....
But if one changes the above code to int a = 1 +* 1 it gives error since no
unary * operator is defined.
--
Summary: Parser does not report error when *+ are used together
in an exp.
Product: gcc
Version: 3.2.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: u_238 at hotmail dot com
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15682