public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* egcs-2.90.27 980315 (egcs-1.0.2 release): <string>/-pedantic
@ 1998-08-14 19:39 E. Jay Berkenbilt
1998-08-15 13:52 ` Alexandre Oliva
0 siblings, 1 reply; 2+ messages in thread
From: E. Jay Berkenbilt @ 1998-08-14 19:39 UTC (permalink / raw)
To: egcs-bugs
I am running a RedHat 5.1/Intel Linux with all updates from RedHat
available as of August 9, 1998. This includes egcs 1.0.2, gcc
2.7.2.3, and libstdc++-2.8.0.
In this environment, the following C++ source file:
========================================
#include <string>
class A
{
public:
A() {};
private:
string a;
};
========================================
when compiled with
g++ -v -c -pedantic a.cc
produces the following output:
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.90.27/specs
gcc version egcs-2.90.27 980315 (egcs-1.0.2 release)
/usr/lib/gcc-lib/i386-redhat-linux/egcs-2.90.27/cpp -lang-c++ -v -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -D__GNUC_MINOR__=90 -Di386 -D__ELF__ -Dunix -Dlinux -D__i386__ -D__ELF__ -D__unix__ -D__linux__ -D__i386 -D__unix -D__linux -Asystem(posix) -D__EXCEPTIONS -pedantic -Di386 -Asystem(unix) -Acpu(i386) -Amachine(i386) -D__i386__ -Asystem(unix) -Acpu(i386) -Amachine(i386) a.cc /tmp/cca01167.ii
GNU CPP version egcs-2.90.27 980315 (egcs-1.0.2 release) (i386 Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
/usr/include/g++
/usr/local/include
/usr/i386-redhat-linux/include
/usr/lib/gcc-lib/i386-redhat-linux/egcs-2.90.27/include
/usr/include
End of search list.
/usr/lib/gcc-lib/i386-redhat-linux/egcs-2.90.27/cc1plus /tmp/cca01167.ii -quiet -dumpbase a.cc -pedantic -version -o /tmp/cca01167.s
GNU C++ version egcs-2.90.27 980315 (egcs-1.0.2 release) (i386-redhat-linux) compiled by GNU C version egcs-2.90.27 980315 (egcs-1.0.2 release).
/usr/include/g++/std/bastring.h: In method `void basic_string<char,string_char_traits<char>,__default_alloc_template<true,0> >::Rep::release()':
/usr/include/g++/std/bastring.h:76: warning: inline function `static void basic_string<char,string_char_traits<char>,__default_alloc_template<true,0> >::Rep::operator delete(void *)' called before definition
/usr/include/g++/std/bastring.h:76: warning: inline function `static void basic_string<char,string_char_traits<char>,__default_alloc_template<true,0> >::Rep::operator delete(void *)' called before definition
as -V -Qy -o a.o /tmp/cca01167.s
GNU assembler version 2.9.1 (i686-pc-linux-gnu), using BFD version 2.9.1.0.4
Editing /usr/include/g++/std/bastring.h to remove the "inline"
qualifier from the operator delete function of the basic_string class
(line 79 in my case) eliminates these errors.
I always use the -Wall -ansi -pedantic when I compile to help me write
code that is as portable as possible.
Please let me know if you need any further information.
--
E. Jay Berkenbilt (ejb@ql.org) | http://www.ql.org/q/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: egcs-2.90.27 980315 (egcs-1.0.2 release): <string>/-pedantic
1998-08-14 19:39 egcs-2.90.27 980315 (egcs-1.0.2 release): <string>/-pedantic E. Jay Berkenbilt
@ 1998-08-15 13:52 ` Alexandre Oliva
0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Oliva @ 1998-08-15 13:52 UTC (permalink / raw)
To: E. Jay Berkenbilt; +Cc: egcs-bugs
E Jay Berkenbilt <ejb@ql.org> writes:
> #include <string>
> class A { public: A() {}; private: string a; };
> GNU C++ version egcs-2.90.27 980315 (egcs-1.0.2 release) (i386-redhat-linux) compiled by GNU C version egcs-2.90.27 980315 (egcs-1.0.2 release).
> /usr/include/g++/std/bastring.h: In method `void basic_string<char,string_char_traits<char>,__default_alloc_template<true,0> >::Rep::release()':
> /usr/include/g++/std/bastring.h:76: warning: inline function `static void basic_string<char,string_char_traits<char>,__default_alloc_template<true,0> >::Rep::operator delete(void *)' called before definition
> /usr/include/g++/std/bastring.h:76: warning: inline function `static void basic_string<char,string_char_traits<char>,__default_alloc_template<true,0> >::Rep::operator delete(void *)' called before definition
> I always use the -Wall -ansi -pedantic when I compile to help me write
> code that is as portable as possible.
this is fixed in the latest egcs snapshot.
--
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1998-08-15 13:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-08-14 19:39 egcs-2.90.27 980315 (egcs-1.0.2 release): <string>/-pedantic E. Jay Berkenbilt
1998-08-15 13:52 ` Alexandre Oliva
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).