public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/42067] New: Misleading error message for misusing a type
@ 2009-11-16 16:59 jlquinn at optonline dot net
2009-11-16 17:02 ` [Bug c++/42067] " pinskia at gcc dot gnu dot org
2009-11-16 17:05 ` pinskia at gcc dot gnu dot org
0 siblings, 2 replies; 3+ messages in thread
From: jlquinn at optonline dot net @ 2009-11-16 16:59 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 887 bytes --]
The following small test drove me crazy and had me convinced that gcc 4.4 had
regressed. I had the C++ spec out too trying to understand exactly how string
is declared until I eventually saw the actual problem, which is that the first
parameter is named 'string'.
I'm not sure exactly how to improve the error message here. 4.3 and earlier
accept this code.
#include <string>
using std::string;
int fn(string& string, string& head);
g++-4.4 -c junk.C
junk.C:3: error: string is not a type
--
Summary: Misleading error message for misusing a type
Product: gcc
Version: 4.4.2
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jlquinn at optonline dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42067
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-11-16 17:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-16 16:59 [Bug c++/42067] New: Misleading error message for misusing a type jlquinn at optonline dot net
2009-11-16 17:02 ` [Bug c++/42067] " pinskia at gcc dot gnu dot org
2009-11-16 17:05 ` pinskia at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).