Bug 14549 - g++: parse-error on valid
Summary: g++: parse-error on valid
Status: RESOLVED DUPLICATE of bug 11796
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 3.3.3
: P2 normal
Target Milestone: 3.4.0
Assignee: Not yet assigned to anyone
URL:
Keywords: rejects-valid
Depends on:
Blocks:
 
Reported: 2004-03-12 09:00 UTC by Kirill Smelkov
Modified: 2005-07-23 22:49 UTC (History)
1 user (show)

See Also:
Host: i686-pc-linux-gnu
Target: i686-pc-linux-gnu
Build: i686-pc-linux-gnu
Known to work: 3.4.0 4.0.0
Known to fail: 3.2.3 3.3.3
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kirill Smelkov 2004-03-12 09:00:33 UTC
I've got parse-error on valid code: 
 
---g++-parse-bug.cpp--- 
struct const_raw_data 
{ 
    const_raw_data(const void* block, unsigned size); 
}; 
 
 
void packet_tx_1() 
{ 
    char  data[] = { 'A', 'B', 'C' }; 
 
    const_raw_data  ( &data[0], 3); 
} 
---------------------------------- 
 
[kirr@tugrik test]$ g++ -Wall -c g++-parse-bug.cpp  
g++-parse-bug.cpp: In function `void packet_tx_1()': 
g++-parse-bug.cpp:11: error: parse error before `,' token 
g++-parse-bug.cpp:9: warning: unused variable `char data[3]' 
 
[kirr@tugrik test]$ g++ -v 
Reading specs from /usr/local/gcc-3.3.3/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/specs 
Configured with: ../gcc-3.3.3/configure --prefix=/usr/local/gcc-3.3.3 --enable-threads=posix 
--enable-languages=c,c++,f77 --enable-checking --disable-nls 
Thread model: posix 
gcc version 3.3.3
Comment 1 Wolfgang Bangerth 2004-03-12 15:16:20 UTC
This is another instance of the old parser getting things wrong. See 
the links about well-known bugs on http://gcc.gnu.org/bugs.html. 
 
This is fixed in 3.4 and mainline, though. 
 
W. 
Comment 2 Andrew Pinski 2004-04-21 01:38:26 UTC
Reopening as this is a dup of ...
Comment 3 Andrew Pinski 2004-04-21 01:38:38 UTC
bug 11796.

*** This bug has been marked as a duplicate of 11796 ***