public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/24817] New: g++ accepts multiple function template declarations even if exception-specification doesn't match.
@ 2005-11-12 1:21 seefeld at sympatico dot ca
2005-11-12 2:57 ` [Bug c++/24817] [3.4/4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: seefeld at sympatico dot ca @ 2005-11-12 1:21 UTC (permalink / raw)
To: gcc-bugs
The following invalid code is accepted by g++:
struct exception {};
template <typename T> void foo() throw(exception);
template <typename T> void foo(); // Error: exception-specification mismatch
struct bar
{
template <typename T> friend void foo(); // Error: exception-specification
mismatch
};
--
Summary: g++ accepts multiple function template declarations even
if exception-specification doesn't match.
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: seefeld at sympatico dot ca
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24817
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/24817] [3.4/4.0/4.1 Regression] g++ accepts multiple function template declarations even if exception-specification doesn't match.
2005-11-12 1:21 [Bug c++/24817] New: g++ accepts multiple function template declarations even if exception-specification doesn't match seefeld at sympatico dot ca
@ 2005-11-12 2:57 ` pinskia at gcc dot gnu dot org
2005-11-14 1:58 ` mmitchel at gcc dot gnu dot org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-11-12 2:57 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2005-11-12 02:57 -------
Confirmed, related to PR 13699 and PR 12255.
The first part of the testcase is rejected in 2.95.3. The second part is not
really a regression.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Known to fail| |3.0.4 3.4.0 3.2.3 3.3.3
| |4.0.0 4.1.0
Known to work| |2.95.3
Last reconfirmed|0000-00-00 00:00:00 |2005-11-12 02:57:54
date| |
Summary|g++ accepts multiple |[3.4/4.0/4.1 Regression] g++
|function template |accepts multiple function
|declarations even if |template declarations even
|exception-specification |if exception-specification
|doesn't match. |doesn't match.
Target Milestone|--- |4.0.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24817
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/24817] [3.4/4.0/4.1 Regression] g++ accepts multiple function template declarations even if exception-specification doesn't match.
2005-11-12 1:21 [Bug c++/24817] New: g++ accepts multiple function template declarations even if exception-specification doesn't match seefeld at sympatico dot ca
2005-11-12 2:57 ` [Bug c++/24817] [3.4/4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
@ 2005-11-14 1:58 ` mmitchel at gcc dot gnu dot org
2005-11-14 5:45 ` mmitchel at gcc dot gnu dot org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-11-14 1:58 UTC (permalink / raw)
To: gcc-bugs
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |mark at codesourcery dot com
|dot org |
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24817
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/24817] [3.4/4.0/4.1 Regression] g++ accepts multiple function template declarations even if exception-specification doesn't match.
2005-11-12 1:21 [Bug c++/24817] New: g++ accepts multiple function template declarations even if exception-specification doesn't match seefeld at sympatico dot ca
2005-11-12 2:57 ` [Bug c++/24817] [3.4/4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
2005-11-14 1:58 ` mmitchel at gcc dot gnu dot org
@ 2005-11-14 5:45 ` mmitchel at gcc dot gnu dot org
2005-11-14 5:49 ` [Bug c++/24817] [3.4/4.0 " mmitchel at gcc dot gnu dot org
2005-12-12 22:35 ` reichelt at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-11-14 5:45 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from mmitchel at gcc dot gnu dot org 2005-11-14 05:45 -------
Subject: Bug 24817
Author: mmitchel
Date: Mon Nov 14 05:45:45 2005
New Revision: 106884
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=106884
Log:
PR c++/24817
* decl.c (check_redeclaration_exception_specification): New
function.
(duplicate_decls): Use it.
* error.c (fndecl_to_string): Print the template parameter list.
PR c++/24817
* g++.dg/eh/spec8.C: New test.
Added:
trunk/gcc/testsuite/g++.dg/eh/spec8.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/decl.c
trunk/gcc/cp/error.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24817
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/24817] [3.4/4.0 Regression] g++ accepts multiple function template declarations even if exception-specification doesn't match.
2005-11-12 1:21 [Bug c++/24817] New: g++ accepts multiple function template declarations even if exception-specification doesn't match seefeld at sympatico dot ca
` (2 preceding siblings ...)
2005-11-14 5:45 ` mmitchel at gcc dot gnu dot org
@ 2005-11-14 5:49 ` mmitchel at gcc dot gnu dot org
2005-12-12 22:35 ` reichelt at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-11-14 5:49 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from mmitchel at gcc dot gnu dot org 2005-11-14 05:49 -------
Fixed in 4.1.
See http://gcc.gnu.org/ml/gcc-patches/2005-11/msg00945.html for rationale for
not fixing this PR in earlier releases.
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[3.4/4.0/4.1 Regression] g++|[3.4/4.0 Regression] g++
|accepts multiple function |accepts multiple function
|template declarations even |template declarations even
|if exception-specification |if exception-specification
|doesn't match. |doesn't match.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24817
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/24817] [3.4/4.0 Regression] g++ accepts multiple function template declarations even if exception-specification doesn't match.
2005-11-12 1:21 [Bug c++/24817] New: g++ accepts multiple function template declarations even if exception-specification doesn't match seefeld at sympatico dot ca
` (3 preceding siblings ...)
2005-11-14 5:49 ` [Bug c++/24817] [3.4/4.0 " mmitchel at gcc dot gnu dot org
@ 2005-12-12 22:35 ` reichelt at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2005-12-12 22:35 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from reichelt at gcc dot gnu dot org 2005-12-12 22:35 -------
Lets close it as fixed then.
--
reichelt at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |reichelt at gcc dot gnu dot
| |org
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|4.0.3 |4.1.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24817
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-12-12 22:35 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-12 1:21 [Bug c++/24817] New: g++ accepts multiple function template declarations even if exception-specification doesn't match seefeld at sympatico dot ca
2005-11-12 2:57 ` [Bug c++/24817] [3.4/4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
2005-11-14 1:58 ` mmitchel at gcc dot gnu dot org
2005-11-14 5:45 ` mmitchel at gcc dot gnu dot org
2005-11-14 5:49 ` [Bug c++/24817] [3.4/4.0 " mmitchel at gcc dot gnu dot org
2005-12-12 22:35 ` reichelt 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).