From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rainer Orth To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org Subject: Re: c++/3047: g++ does not define _LANGUAGE_C_PLUS_PLUS needed for on IRIX Date: Tue, 05 Jun 2001 05:36:00 -0000 Message-id: <20010605123601.32631.qmail@sourceware.cygnus.com> X-SW-Source: 2001-06/msg00120.html List-Id: The following reply was made to PR c++/3047; it has been noted by GNATS. From: Rainer Orth To: drk@sgi.com Cc: gcc-gnats@gcc.gnu.org, johnv@adacel.com.au, gcc-bugs@gcc.gnu.org Subject: Re: c++/3047: g++ does not define _LANGUAGE_C_PLUS_PLUS needed for on IRIX Date: 05 Jun 2001 14:32:10 +0200 drk@sgi.com writes: > % cat hello.cpp > #include > > void sig_handler(int sig) { > exit (0); > } > > int main() { > signal(SIGTERM,sig_handler); > } > % g++ -o with -D_LANGUAGE_C_PLUS_PLUS hello.cpp > ld32: WARNING 84 : /usr/local/lib/gcc-lib/mips-sgi-irix6.5/2.95.1/libstdc++.a is not used for resolving any symbol. > ld32: WARNING 84 : /usr/lib32/libm.so is not used for resolving any symbol. > % g++ -o without hello.cpp > hello.cpp: In function `int main()': > hello.cpp:8: ANSI C++ prohibits conversion from `(int)' to `(...)' Currently, g++ (in config/mips/mips.h (CPP_SPEC)) bases the decision whether or not to define _LANGUAGE_C_PLUS_PLUS on the source files' extension. Renaming the file to one of hello.cc, hello.cxx, or hello.C works around this problem for the moment. If I can find out how to test what language is currently being compiled (the -x switch) and how to test this in a spec, I'll submit a patch to fix the problem this (obviously better) way. Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Faculty of Technology, Bielefeld University Email: ro@TechFak.Uni-Bielefeld.DE