public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/31952]  New: parameters may be redeclared in a function try-block
@ 2007-05-16 13:13 andrew dot stubbs at st dot com
  2007-05-16 19:47 ` [Bug c++/31952] " fang at csl dot cornell dot edu
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: andrew dot stubbs at st dot com @ 2007-05-16 13:13 UTC (permalink / raw)
  To: gcc-bugs

According to the C++ standard, clause 3.3.2, paragraph 2, sentence 3, the
following program should be invalid:

int
foo (int bar)
try
{
  return 0;
}
catch (...)
{
  int bar = 0; // invalid
  return 1;
}

Specifically, `bar' may not be redeclared in the outermost block of a handler
in a function try-block.

GCC 4.1.1 gives no errors or warnings (other than unused parameters and
variables).


-- 
           Summary: parameters may be redeclared in a function try-block
           Product: gcc
           Version: 4.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: andrew dot stubbs at st dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31952


^ permalink raw reply	[flat|nested] 11+ messages in thread
[parent not found: <bug-31952-4@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2013-05-15 16:11 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-16 13:13 [Bug c++/31952] New: parameters may be redeclared in a function try-block andrew dot stubbs at st dot com
2007-05-16 19:47 ` [Bug c++/31952] " fang at csl dot cornell dot edu
2007-05-17 14:35 ` andrew dot stubbs at st dot com
2007-05-17 14:52 ` bangerth at dealii dot org
2007-11-01 18:15 ` andrew dot stubbs at st dot com
2009-11-06  6:58 ` pi3orama at gmail dot com
     [not found] <bug-31952-4@http.gcc.gnu.org/bugzilla/>
2012-08-20 10:30 ` paolo.carlini at oracle dot com
2012-08-20 10:43 ` paolo.carlini at oracle dot com
2013-05-13 19:29 ` paolo.carlini at oracle dot com
2013-05-14 15:55 ` jason at gcc dot gnu.org
2013-05-15 16:11 ` paolo.carlini at oracle dot com

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).