This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/11196] parse error before numeric constant <M_PI is defined in C++>
- From: "gcc-bugzilla at contacts dot eelis dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Nov 2007 18:42:35 -0000
- Subject: [Bug libstdc++/11196] parse error before numeric constant <M_PI is defined in C++>
- References: <bug-11196-6301@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from gcc-bugzilla at contacts dot eelis dot net 2007-11-13 18:42 -------
(In reply to comment #6)
> The bug is that the C++ front end implicitly #defines _GNU_SOURCE.
> [..]
> Could some libstdc++ guru explain why this define is actually needed?
I am no libstdc++ guru, but this:
echo "#include <cstdlib>" | g++ -x c++ -U _GNU_SOURCE -c -
produces:
/usr/include/c++/4.1.2/cstdlib:162: error: â??::lldiv_tâ?? has not been
declared
/usr/include/c++/4.1.2/cstdlib:168: error: â??::_Exitâ?? has not been
declared
/usr/include/c++/4.1.2/cstdlib:175: error: â??::llabsâ?? has not been
declared
/usr/include/c++/4.1.2/cstdlib:177: error: â??lldiv_tâ?? does not name a type
/usr/include/c++/4.1.2/cstdlib:181: error: â??::lldivâ?? has not been
declared
/usr/include/c++/4.1.2/cstdlib:196: error: â??::strtofâ?? has not been
declared
/usr/include/c++/4.1.2/cstdlib:197: error: â??::strtoldâ?? has not been
declared
/usr/include/c++/4.1.2/cstdlib:203: error: â??__gnu_cxx::lldiv_tâ?? has not
been declared
/usr/include/c++/4.1.2/cstdlib:205: error: â??__gnu_cxx::_Exitâ?? has not
been declared
/usr/include/c++/4.1.2/cstdlib:208: error: â??__gnu_cxx::llabsâ?? has not
been declared
/usr/include/c++/4.1.2/cstdlib:209: error: â??__gnu_cxx::divâ?? has not been
declared
/usr/include/c++/4.1.2/cstdlib:210: error: â??__gnu_cxx::lldivâ?? has not
been declared
/usr/include/c++/4.1.2/cstdlib:213: error: â??__gnu_cxx::strtofâ?? has not
been declared
/usr/include/c++/4.1.2/cstdlib:216: error: â??__gnu_cxx::strtoldâ?? has not
been declared
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11196