This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/15343] New: Casting to SystemC types confuses parser
- From: "savoiu at ics dot uci dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 May 2004 22:02:42 -0000
- Subject: [Bug c++/15343] New: Casting to SystemC types confuses parser
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following code:
#include "systemc.h"
void boog()
{
sc_uint<17> a;
sc_int<17> b;
sc_uint<17> c;
c=sc_uint<17>
(
(
(
sc_uint<32>
(
sc_uint<17>
(
b
)
)
&
sc_uint<32>
(
8
)
)
|
sc_uint<32>
(
a
)
)
);
}
when compiled against SystemC 2.0.1) results in the following error:
sc_boog.cpp: In function `void boog()':
sc_boog.cpp:21: parse error before `&' token
sc_boog.cpp:36: parse error before `)' token
This happens for g++ 2.95.3, 3.2, 3.3.3 but not 3.4.
I am also attaching a bzip2-ed preprocessed version of the code.
Nick
------------------------------------------------------
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking
--host=i386-redhat-linux --with-system-zlib --enable-__cxa_atexit
Thread model: posix
gcc version 3.2 20020903 (Red Hat Linux 8.0 3.2-7)
------------------------------------------------------
--
Summary: Casting to SystemC types confuses parser
Product: gcc
Version: 3.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: savoiu at ics dot uci dot edu
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15343