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]

egcs-2.90.27 980315 (egcs-1.0.2 release): <string>/-pedantic



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/


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