stl_algo.h name conflict with gcc internal
Petter Urkedal
petter@matfys.lth.se
Thu Oct 21 02:12:00 GMT 1999
Benjamin Kosnik wrote:
>
> Do you have any example code that demonstrates this?
Yes, below. (I don't put code before headers on purpose, it
just happens when there is a lot of include files including
each other...)
-petter.
[---]$ cat opr.cc
struct C {
operator long double() {}
};
#include <algorithm>
[---]$ c++3 opr.cc
In file included from
/usr/local/lib3/include/g++-v3/bits/std_algorithm.h:34,
from /usr/local/lib3/include/g++-v3/algorithm:2,
from opr.cc:4:
/usr/local/lib3/include/g++-v3/bits/stl_algo.h:452: declaration of
`operator long double' as non-function
/usr/local/lib3/include/g++-v3/bits/stl_algo.h:452: confused by earlier
errors, bailing out
[---]$ c++3 -v
Reading specs from /usr/local/lib/gcc-lib/i586-pc-linux-gnu/2.96/specs
gcc version 2.96 19991018 (experimental)
c++: No input files
[---]$ alias c++3
alias c++3='c++ -I/usr/local/lib3/include/g++-v3 -L/usr/local/lib3/lib'
--
[ http://matfys.lth.se/~petter/ ]
More information about the Gcc-bugs
mailing list