This is the mail archive of the 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]

Bug: missing endl

The following looks like a bug to me, discovered in 20000821 snapshot:

valinux[69] cat
#include <iostream>

namespace A {

    template<class B>
    class XYZ {
        void compute();

    template<class B>
    void XYZ<B>::compute()
        using namespace std;

        cout << "Testing." << endl;


namespace A {
    template class XYZ<int>;
valinux[70] c++ -v -c
Reading specs from /va1/furnish/gcc/lib/gcc-lib/i686-pc-linux/2.96/specs
gcc version 2.96 20000821 (experimental)
 /va1/furnish/gcc/lib/gcc-lib/i686-pc-linux/2.96/cpp0 -lang-c++ -D__GNUG__=2 -v -D__GNUC__=2 -D__GNUC_MINOR__=96 -D__GNUC_PATCHLEVEL__=0 -D__ELF__ -Dunix -Dlinux -D__ELF__ -D__unix__ -D__linux__ -D__unix -D__linux -Asystem(posix) -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ -D__tune_pentiumpro__ /tmp/ccaxMWTc.ii
GNU CPP version 2.96 20000821 (experimental) (cpplib)
 (i386 Linux/ELF)
ignoring nonexistent directory "/usr/local/include"
#include "..." search starts here:
#include <...> search starts here:
End of search list.
 /va1/furnish/gcc/lib/gcc-lib/i686-pc-linux/2.96/cc1plus /tmp/ccaxMWTc.ii -quiet -dumpbase -version -o /tmp/cc98EJPi.s
GNU C++ version 2.96 20000821 (experimental) (i686-pc-linux) compiled by GNU C version 2.96 20000821 (experimental). In method `void A::XYZ<B>::compute () [with B = int]':   instantiated from here `endl' undeclared (first use this function) (Each undeclared identifier is reported only once for each function it 
appears in.)

I don't know if it matters, but this snapshot was configured with
--enable-libstdcxx-v3 --enable-shared.

Geoffrey Furnish            Actel Corporation
Senior Staff Engineer      955 East Arques Ave       voice: 408-522-7528
Placement & Routing     Sunnyvale, CA   94086-4533   fax:   408-522-8041

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