This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/11196] parse error before numeric constant <M_PI is defined in C++>



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]