[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Missing error message in g++ 3.4
From: |
Ron House |
Subject: |
Missing error message in g++ 3.4 |
Date: |
Wed, 09 Mar 2005 13:28:40 +1000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041217 |
I found this difference in error reporting between 3.3 and 3.4; looks
like faulty error reporting in 3.4:
Source fragment from line 879:
char datcpy[1000 * sizeof student_cl]; <-- class name should be in ()
for (int i = 0; i < ClassSize(); ++i) {
memcpy(&((student_cl*)datcpy)[i], stud_base.rawData()+i,
sizeof(student_cl));
}
Cygwin printout:
mark2.cpp: In function `void arrange()':
mark2.cpp:879: error: syntax error before `]' token
mark2.cpp:881: error: `datcpy' undeclared (first use this function)
mark2.cpp:881: error: (Each undeclared identifier is reported only once for
each function it appears in.)
SCI-0022468:/cygdrive/c/assess3$ g++ --version
g++ (GCC) 3.3.1 (cygming special)
Mingw printout:
mark2.cpp: In function `void arrange()':
mark2.cpp:881: error: `datcpy' undeclared (first use this function)
mark2.cpp:881: error: (Each undeclared identifier is reported only once
for each
function it appears in.)
SCI-0022468:/cygdrive/c/assess3$ g++ --version
g++.exe (GCC) 3.4.2 (mingw-special)
Clearly the mingw messages omit the extremely salient error on line 879,
making the one it does produce look wacky, as the programmer can see the
declaration with no apparent errors.
--
Ron House address@hidden
http://www.sci.usq.edu.au/staff/house
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Missing error message in g++ 3.4,
Ron House <=
- Prev by Date:
Re:
- Next by Date:
Re:
- Previous by thread:
Re:
- Next by thread:
Re:
- Index(es):