public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/13101] New: incorrect warning on initialized extern const function pointer
@ 2003-11-18 10:45 jbeulich at novell dot com
2004-04-27 19:00 ` [Bug c++/13101] " pinskia at gcc dot gnu dot org
0 siblings, 1 reply; 6+ messages in thread
From: jbeulich at novell dot com @ 2003-11-18 10:45 UTC (permalink / raw)
To: gcc-bugs
While for most other types the warning does, as expected, not occur, the
following construct causes it. Since the warning cannot be suppressed this
especially causes problems in -Werror contexts. Note additionally that despite
the warning that object is placed into .rodata (which indicates that the
compiler did not lose the 'const' qualifier, as could be assumed by inspecting
the check made in grokdeclarator(), which obviously suggests the qualifier is
missing). Not also that omitting the extern specifier and turning on
optimization leads to the symbol being eliminated if otherwise unreferenced (as
expected, but considered another proof of the const qualifier being honored in
every other respect).
extern void(*const ptr)() = 0;
--
Summary: incorrect warning on initialized extern const function
pointer
Product: gcc
Version: 3.3.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jbeulich at novell dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-gnu-linux
GCC host triplet: i686-pc-gnu-linux
GCC target triplet: i686-pc-gnu-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13101
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/13101] incorrect warning on initialized extern const function pointer
2003-11-18 10:45 [Bug c++/13101] New: incorrect warning on initialized extern const function pointer jbeulich at novell dot com
@ 2004-04-27 19:00 ` pinskia at gcc dot gnu dot org
0 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-27 19:00 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-04-27 18:34 -------
Confirmed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |diagnostic
Known to fail| |3.0.4 3.3.1 3.4.0 3.5.0
Last reconfirmed|0000-00-00 00:00:00 |2004-04-27 18:34:32
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13101
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/13101] incorrect warning on initialized extern const function pointer
[not found] <bug-13101-1068@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2008-07-11 18:14 ` dodji at gcc dot gnu dot org
@ 2008-07-11 18:32 ` dodji at gcc dot gnu dot org
3 siblings, 0 replies; 6+ messages in thread
From: dodji at gcc dot gnu dot org @ 2008-07-11 18:32 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from dodji at gcc dot gnu dot org 2008-07-11 18:32 -------
A fix for this bug has been committed to trunk in changeset r137723.
--
dodji at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.4.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13101
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/13101] incorrect warning on initialized extern const function pointer
[not found] <bug-13101-1068@http.gcc.gnu.org/bugzilla/>
2008-07-02 22:19 ` dseketel at redhat dot com
2008-07-10 14:31 ` dodji at gcc dot gnu dot org
@ 2008-07-11 18:14 ` dodji at gcc dot gnu dot org
2008-07-11 18:32 ` dodji at gcc dot gnu dot org
3 siblings, 0 replies; 6+ messages in thread
From: dodji at gcc dot gnu dot org @ 2008-07-11 18:14 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from dodji at gcc dot gnu dot org 2008-07-11 18:13 -------
Subject: Bug 13101
Author: dodji
Date: Fri Jul 11 18:12:37 2008
New Revision: 137723
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=137723
Log:
2008-07-11 Dodji Seketeli <dseketel@redhat.com>
PR c++/13101
* decl.c (grokdeclarator): Warn about initializing variables
of storage class 'extern' only after the type of the declarator
has been properly computed.
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/decl.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.old-deja/g++.jason/crash11.C
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13101
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/13101] incorrect warning on initialized extern const function pointer
[not found] <bug-13101-1068@http.gcc.gnu.org/bugzilla/>
2008-07-02 22:19 ` dseketel at redhat dot com
@ 2008-07-10 14:31 ` dodji at gcc dot gnu dot org
2008-07-11 18:14 ` dodji at gcc dot gnu dot org
2008-07-11 18:32 ` dodji at gcc dot gnu dot org
3 siblings, 0 replies; 6+ messages in thread
From: dodji at gcc dot gnu dot org @ 2008-07-10 14:31 UTC (permalink / raw)
To: gcc-bugs
--
dodji at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |dodji at gcc dot gnu dot org
|dot org |
Status|NEW |ASSIGNED
Last reconfirmed|2005-12-18 20:24:46 |2008-07-10 14:30:32
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13101
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/13101] incorrect warning on initialized extern const function pointer
[not found] <bug-13101-1068@http.gcc.gnu.org/bugzilla/>
@ 2008-07-02 22:19 ` dseketel at redhat dot com
2008-07-10 14:31 ` dodji at gcc dot gnu dot org
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: dseketel at redhat dot com @ 2008-07-02 22:19 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from dseketel at redhat dot com 2008-07-02 22:19 -------
Hello,
I have sent a patch to the list at
http://gcc.gnu.org/ml/gcc-patches/2008-07/msg00160.html.
Hopefully that patch should fix this issue.
--
dseketel at redhat dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dseketel at redhat dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13101
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-07-11 18:32 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-18 10:45 [Bug c++/13101] New: incorrect warning on initialized extern const function pointer jbeulich at novell dot com
2004-04-27 19:00 ` [Bug c++/13101] " pinskia at gcc dot gnu dot org
[not found] <bug-13101-1068@http.gcc.gnu.org/bugzilla/>
2008-07-02 22:19 ` dseketel at redhat dot com
2008-07-10 14:31 ` dodji at gcc dot gnu dot org
2008-07-11 18:14 ` dodji at gcc dot gnu dot org
2008-07-11 18:32 ` dodji at gcc dot gnu dot 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).