public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/49745] New: error: ‘int truncate’ redeclared as different kind of symbol
@ 2011-07-14 10:29 mathieu.malaterre at gmail dot com
  2011-07-14 10:32 ` [Bug libstdc++/49745] " rguenth at gcc dot gnu.org
                   ` (26 more replies)
  0 siblings, 27 replies; 28+ messages in thread
From: mathieu.malaterre at gmail dot com @ 2011-07-14 10:29 UTC (permalink / raw)
  To: gcc-bugs

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 !


^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2022-04-26 13:12 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-14 10:29 [Bug c++/49745] New: error: ‘int truncate’ redeclared as different kind of symbol mathieu.malaterre at gmail dot com
2011-07-14 10:32 ` [Bug libstdc++/49745] " rguenth at gcc dot gnu.org
2011-07-14 10:52 ` redi at gcc dot gnu.org
2011-07-14 11:02 ` redi at gcc dot gnu.org
2011-07-14 11:13 ` redi at gcc dot gnu.org
2011-07-14 12:02 ` paolo.carlini at oracle dot com
2011-07-14 12:08 ` paolo.carlini at oracle dot com
2011-07-14 12:13 ` redi at gcc dot gnu.org
2011-07-14 12:31 ` paolo.carlini at oracle dot com
2011-07-14 12:34 ` jakub at gcc dot gnu.org
2011-07-14 12:35 ` jakub at gcc dot gnu.org
2011-07-14 12:45 ` paolo.carlini at oracle dot com
2011-07-14 21:51 ` paolo.carlini at oracle dot com
2011-07-14 21:55 ` jakub at gcc dot gnu.org
2011-07-14 22:00 ` paolo.carlini at oracle dot com
2011-07-15 10:24 ` paolo.carlini at oracle dot com
2011-07-15 10:51 ` jakub at gcc dot gnu.org
2011-07-15 10:53 ` paolo.carlini at oracle dot com
2011-07-15 11:54 ` paolo.carlini at oracle dot com
2011-07-15 12:10 ` paolo.carlini at oracle dot com
2011-07-15 21:53 ` paolo at gcc dot gnu.org
2011-07-15 21:55 ` paolo.carlini at oracle dot com
2021-10-10 12:51 ` hjl.tools at gmail dot com
2021-10-25 18:30 ` law at gcc dot gnu.org
2021-11-10 12:04 ` cvs-commit at gcc dot gnu.org
2021-11-24 11:50 ` cvs-commit at gcc dot gnu.org
2022-01-08 10:51 ` pinskia at gcc dot gnu.org
2022-04-26 13:12 ` cvs-commit at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).