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]
Other format: [Raw text]

[Bug c++/49745] New: error: âint truncateâ redeclared as different kind of symbol


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

           Summary: error: âint truncateâ redeclared as different kind of
                    symbol
           Product: gcc
           Version: 4.4.5
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: mathieu.malaterre@gmail.com


Hi,

  g++ pollutes the global namespace. The following does not compile with G++
4.4.5:


#include <iostream>
int truncate = 0;
int main()
{
  return 0;
}

If fails with:


t.cxx:2: error: âint truncateâ redeclared as different kind of symbol
/usr/include/unistd.h:998: error: previous declaration of âint truncate(const
char*, __off_t)â


Thanks !


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