public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "mathieu.malaterre at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/49745] New: error: ‘int truncate’ redeclared as different kind of symbol
Date: Thu, 14 Jul 2011 10:29:00 -0000	[thread overview]
Message-ID: <bug-49745-4@http.gcc.gnu.org/bugzilla/> (raw)

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 !


             reply	other threads:[~2011-07-14 10:29 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-14 10:29 mathieu.malaterre at gmail dot com [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-49745-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).