[Bug libstdc++/12221] New: fstream.tcc:463: error: expected unqualified-id

alexander dot riesen at synopsys dot com gcc-bugzilla@gcc.gnu.org
Tue Sep 9 09:53:00 GMT 2003


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12221

           Summary: fstream.tcc:463: error: expected unqualified-id
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libstdc++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: alexander dot riesen at synopsys dot com
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: i686-pc-linux-gnu

The mentioned line generates compile error:

/u/riesen/gcc-3.4-20030903/lib/gcc/i686-pc-linux-gnu/3.4/../../../../include/c++/3.4/bits/fstream.tcc:
In member function `virtual streamsize std::basic_filebuf<_CharT,
_Traits>::xsputn(const _CharT*, streamsize)':
/u/riesen/gcc-3.4-20030903/lib/gcc/i686-pc-linux-gnu/3.4/../../../../include/c++/3.4/bits/fstream.tcc:463:
error: expected unqualified-id

For such code:

#include <algorithm>
// some header file doing #define:
#define min(a,b) ((a)<(b)?(a): (b))
#include <fstream>

Probably '#undef min' could be useful in every stl header, as vendors and some
long-living projects seem to never catch up with the idea.



More information about the Gcc-bugs mailing list