public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/16605] New: expected unqualified-id before '(' token in vector.tcc and stl_bvector.h
@ 2004-07-17 11:04 g dot s at arcor dot de
2004-07-17 11:55 ` [Bug c++/16605] " falk at debian dot org
` (4 more replies)
0 siblings, 5 replies; 7+ messages in thread
From: g dot s at arcor dot de @ 2004-07-17 11:04 UTC (permalink / raw)
To: gcc-bugs
There seems to be a bug in the STL code. When I compile RealVNC 4.0, I get error
messages like this one:
/usr/bin/../lib/gcc/i386-pc-solaris2.9/3.4.1/../../../../include/c++/3.4.1/bits/stl_bvector.h:823:
error: expected unqualified-id before '(' token
I also get these messages for bits/vector.tcc. Taking a look at the files showed
that the code uses "std::max" instead of "max". After removing the "std::", the
compilation completes without errors.
--
Summary: expected unqualified-id before '(' token in vector.tcc
and stl_bvector.h
Product: gcc
Version: 3.4.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: g dot s at arcor dot de
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: 3.4.1
GCC host triplet: i386-pc-solaris2.9
GCC target triplet: i386-pc-solaris2.9
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16605
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/16605] expected unqualified-id before '(' token in vector.tcc and stl_bvector.h
2004-07-17 11:04 [Bug c++/16605] New: expected unqualified-id before '(' token in vector.tcc and stl_bvector.h g dot s at arcor dot de
@ 2004-07-17 11:55 ` falk at debian dot org
2004-07-17 17:36 ` pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: falk at debian dot org @ 2004-07-17 11:55 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From falk at debian dot org 2004-07-17 11:55 -------
Please provide a test case (ideally both preprocessed and unpreprocessed)
and *complete* error messages.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16605
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/16605] expected unqualified-id before '(' token in vector.tcc and stl_bvector.h
2004-07-17 11:04 [Bug c++/16605] New: expected unqualified-id before '(' token in vector.tcc and stl_bvector.h g dot s at arcor dot de
2004-07-17 11:55 ` [Bug c++/16605] " falk at debian dot org
@ 2004-07-17 17:36 ` pinskia at gcc dot gnu dot org
2004-07-17 17:49 ` g dot s at arcor dot de
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-07-17 17:36 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-07-17 17:36 -------
I think the issue comes form you (or really the source) define max to be something which is wrong
because you violate the C++ standard as there is a max in std also.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16605
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/16605] expected unqualified-id before '(' token in vector.tcc and stl_bvector.h
2004-07-17 11:04 [Bug c++/16605] New: expected unqualified-id before '(' token in vector.tcc and stl_bvector.h g dot s at arcor dot de
2004-07-17 11:55 ` [Bug c++/16605] " falk at debian dot org
2004-07-17 17:36 ` pinskia at gcc dot gnu dot org
@ 2004-07-17 17:49 ` g dot s at arcor dot de
2004-07-17 17:51 ` pinskia at gcc dot gnu dot org
2004-07-19 13:38 ` bangerth at dealii dot org
4 siblings, 0 replies; 7+ messages in thread
From: g dot s at arcor dot de @ 2004-07-17 17:49 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From g dot s at arcor dot de 2004-07-17 17:49 -------
The complete error message is:
c++ -I.. -DHAVE_VSNPRINTF -O2 -Wall -Wno-unknown-pragmas -Wno-implicit-int
-fpermissive -c HTTPServer.cxx
cc1plus: warning: command line option "-Wno-implicit-int" is valid for C/ObjC
but not for C++
In file included from
/usr/bin/../lib/gcc/i386-pc-solaris2.9/3.4.1/../../../../include/c++/3.4.1/vector:75,
from ../rfb/Region.h:25,
from ../rfb/UpdateTracker.h:23,
from ../rfb/HTTPServer.h:32,
from HTTPServer.cxx:19:
/usr/bin/../lib/gcc/i386-pc-solaris2.9/3.4.1/../../../../include/c++/3.4.1/bits/vector.tcc:
In member function `void std::vector<_Tp,
_Alloc>::_M_fill_insert(__gnu_cxx::__normal_iterator<typename _Alloc::pointer,
std::vector<_Tp, _Alloc> >, size_t, const _Tp&)':
/usr/bin/../lib/gcc/i386-pc-solaris2.9/3.4.1/../../../../include/c++/3.4.1/bits/vector.tcc:307:
error: expected unqualified-id before '(' token
*** Error code 1
make: Fatal error: Command failed for target `HTTPServer.o'
Current working directory /disk3/vnc-4.0-unixsrc/rfb
*** Error code 1
make: Fatal error: Command failed for target `all'
I don't know how to make a test case, I didn't even write the code which fails
to compile. But I took a look at vector.tcc of gcc 3.3.2 and saw the missing
"std::" in front of "max" and removed it from vector.tcc auf gcc 3.4.1 and then
VNC compiled without any errors.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16605
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/16605] expected unqualified-id before '(' token in vector.tcc and stl_bvector.h
2004-07-17 11:04 [Bug c++/16605] New: expected unqualified-id before '(' token in vector.tcc and stl_bvector.h g dot s at arcor dot de
` (2 preceding siblings ...)
2004-07-17 17:49 ` g dot s at arcor dot de
@ 2004-07-17 17:51 ` pinskia at gcc dot gnu dot org
2004-07-19 13:38 ` bangerth at dealii dot org
4 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-07-17 17:51 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-07-17 17:51 -------
Actually this is not a gcc bug but rather a bug in the sources you trying to compile, report it to them
instead of us.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16605
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/16605] expected unqualified-id before '(' token in vector.tcc and stl_bvector.h
2004-07-17 11:04 [Bug c++/16605] New: expected unqualified-id before '(' token in vector.tcc and stl_bvector.h g dot s at arcor dot de
` (3 preceding siblings ...)
2004-07-17 17:51 ` pinskia at gcc dot gnu dot org
@ 2004-07-19 13:38 ` bangerth at dealii dot org
4 siblings, 0 replies; 7+ messages in thread
From: bangerth at dealii dot org @ 2004-07-19 13:38 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bangerth at dealii dot org 2004-07-19 13:38 -------
Your code defines min/max as macros. The preprocessor expands this, which
leaves what used to be std::max(x1, x2) as something that doesn't make
much sense to the compiler any more.
Since the standard says that the names min/max are reserved, simply
remove these #defines from your sources.
W.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16605
^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <bug-16605-8970@http.gcc.gnu.org/bugzilla/>]
end of thread, other threads:[~2006-04-19 18:24 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-17 11:04 [Bug c++/16605] New: expected unqualified-id before '(' token in vector.tcc and stl_bvector.h g dot s at arcor dot de
2004-07-17 11:55 ` [Bug c++/16605] " falk at debian dot org
2004-07-17 17:36 ` pinskia at gcc dot gnu dot org
2004-07-17 17:49 ` g dot s at arcor dot de
2004-07-17 17:51 ` pinskia at gcc dot gnu dot org
2004-07-19 13:38 ` bangerth at dealii dot org
[not found] <bug-16605-8970@http.gcc.gnu.org/bugzilla/>
2006-04-19 18:24 ` pcarlini at suse dot de
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).