[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#195865: marked as done (gcc-3.3 wrongly complains about shadowed declarations)



Your message dated Tue, 3 Jun 2003 17:59:17 -0400
with message-id <20030603215917.GA7731@nevyn.them.org>
and subject line Bug#195865: gcc-3.3 wrongly complains about shadowed declarations
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 2 Jun 2003 22:50:37 +0000
>From robe@mirror.inode.at Mon Jun 02 17:50:35 2003
Return-path: <robe@mirror.inode.at>
Received: from smtp-01.inode.at (smtp.inode.at) [62.99.194.3] 
	by master.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 19My8Q-0001Sz-00; Mon, 02 Jun 2003 17:50:34 -0500
Received: from mirror.inode.at ([81.223.20.34]:37655)
	by smtp.inode.at with esmtp (Exim 4.10)
	id 19My8E-0000gz-00; Tue, 03 Jun 2003 00:50:22 +0200
Received: from robe by mirror.inode.at with local (Exim 3.36 #1 (Debian))
	id 19My8N-0001tj-00; Tue, 03 Jun 2003 00:50:31 +0200
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: Michael Renner <robe@amd.co.at>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: gcc-3.3 wrongly complains about shadowed declarations
X-Mailer: reportbug 2.10.1
Date: Tue, 03 Jun 2003 00:50:31 +0200
Message-Id: <[🔎] E19My8N-0001tj-00@mirror.inode.at>
Sender: Michael Renner <robe@mirror.inode.at>
Delivered-To: submit@bugs.debian.org
X-Spam-Status: No, hits=-6.0 required=4.0
	tests=BAYES_01,HAS_PACKAGE
	version=2.53-bugs.debian.org_2003_05_24
X-Spam-Level: 
X-Spam-Checker-Version: SpamAssassin 2.53-bugs.debian.org_2003_05_24 (1.174.2.15-2003-03-30-exp)

Package: gcc-3.3
Version: 1:3.3-2
Severity: minor
Tags: upstream

It seems as if gcc-3.3 has some builtin "stuff" which causes wrong
reports on shadowed declarations. These are the warnings caused by a
build of the current proftpd cvs tree:

---

main.c: In function `session_exit':
main.c:382: warning: declaration of `log' shadows a global declaration
<built-in>:0: warning: shadowed declaration is here

log.c:380: warning: shadowing built-in function `log'

mod_log.c: In function `find_extendedlogs':
mod_log.c:979: warning: declaration of `logf' shadows a global declaration
<built-in>:0: warning: shadowed declaration is here

---

Here is a code sippet from main.c:

---

void session_exit(int pri, void *lv, int exitval, void *dummy) {
  char *log = (char *) lv;

  log_pri(pri, "%s", log);

  if (is_standalone && is_master) {
    log_pri(PR_LOG_NOTICE, "ProFTPD " PROFTPD_VERSION_TEXT
      " standalone mode SHUTDOWN");

    PRIVS_ROOT
    pr_delete_scoreboard();
    if (!nodaemon)
      unlink(PidPath);
    PRIVS_RELINQUISH
  }

  end_login(exitval);
}

---

These warnings didn't happen with gcc-2.95.4 and gcc-3.2.


-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux mirror 2.4.20 #2 Wed Mar 19 23:04:57 CET 2003 i686
Locale: LANG=C, LC_CTYPE=C

Versions of packages gcc-3.3 depends on:
ii  binutils                 2.14.90.0.2-0.1 The GNU assembler, linker and bina
ii  cpp-3.3                  1:3.3-2         The GNU C preprocessor
ii  gcc-3.3-base             1:3.3-2         The GNU Compiler Collection (base 
ii  libc6                    2.3.1-16        GNU C Library: Shared libraries an
ii  libgcc1                  1:3.3-2         GCC support library

-- no debconf information


---------------------------------------
Received: (at 195865-done) by bugs.debian.org; 3 Jun 2003 21:59:28 +0000
>From drow@false.org Tue Jun 03 16:59:27 2003
Return-path: <drow@false.org>
Received: from crack.them.org [146.82.138.56] 
	by master.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 19NJoV-000055-00; Tue, 03 Jun 2003 16:59:27 -0500
Received: from dsl093-172-017.pit1.dsl.speakeasy.net
	([66.93.172.17] helo=nevyn.them.org ident=mail)
	by crack.them.org with asmtp (Exim 3.12 #1 (Debian))
	id 19NJp3-00010B-00; Tue, 03 Jun 2003 17:00:01 -0500
Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian))
	id 19NJoM-000211-00; Tue, 03 Jun 2003 17:59:18 -0400
Date: Tue, 3 Jun 2003 17:59:17 -0400
From: Daniel Jacobowitz <dan@debian.org>
To: Michael Renner <robe@amd.co.at>
Cc: 195865-done@bugs.debian.org
Subject: Re: Bug#195865: gcc-3.3 wrongly complains about shadowed declarations
Message-ID: <20030603215917.GA7731@nevyn.them.org>
References: <[🔎] E19My8N-0001tj-00@mirror.inode.at> <[🔎] 20030603014145.GA1953@nevyn.them.org> <[🔎] Pine.LNX.4.50.0306032323280.29241-100000@trottelkunde.amd.co.at>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <[🔎] Pine.LNX.4.50.0306032323280.29241-100000@trottelkunde.amd.co.at>
User-Agent: Mutt/1.5.1i
Delivered-To: 195865-done@bugs.debian.org
X-Spam-Status: No, hits=-21.8 required=4.0
	tests=BAYES_10,EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT,
	      REFERENCES,REPLY_WITH_QUOTES,USER_AGENT_MUTT
	autolearn=ham version=2.53-bugs.debian.org_2003_05_24
X-Spam-Level: 
X-Spam-Checker-Version: SpamAssassin 2.53-bugs.debian.org_2003_05_24 (1.174.2.15-2003-03-30-exp)

On Tue, Jun 03, 2003 at 11:56:21PM +0200, Michael Renner wrote:
> 
> 
> On Mon, 2 Jun 2003, Daniel Jacobowitz wrote:
> 
> > On Tue, Jun 03, 2003 at 12:50:31AM +0200, Michael Renner wrote:
> > > Package: gcc-3.3
> > > Version: 1:3.3-2
> > > Severity: minor
> > > Tags: upstream
> > >
> > > It seems as if gcc-3.3 has some builtin "stuff" which causes wrong
> > > reports on shadowed declarations. These are the warnings caused by a
> > > build of the current proftpd cvs tree:
> >
> > I'm pretty sure that naming functions log and logf is actually invalid
> > C.  They're both specified as reserved names in the standard (7.1.3 #1
> > in C99).
> 
> Yeah, my fault, I didn't know that C99 extended the scope of the
> reserved names that much. Please close the bug report.

Thanks for following up.  Done.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer



Reply to: