This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/49745] New: error: âint truncateâ redeclared as different kind of symbol
- From: "mathieu.malaterre at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 14 Jul 2011 10:28:48 +0000
- Subject: [Bug c++/49745] New: error: âint truncateâ redeclared as different kind of symbol
- Auto-submitted: auto-generated
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 !