public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/53371] New: rvalue reference type as exception-declaration
@ 2012-05-16  3:30 vexocide at gmail dot com
  2012-05-16  4:11 ` [Bug c++/53371] " vexocide at gmail dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: vexocide at gmail dot com @ 2012-05-16  3:30 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 53371
           Summary: rvalue reference type as exception-declaration
    Classification: Unclassified
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: vexocide@gmail.com


Using built-in specs.
COLLECT_GCC=g++-mp-4.7
COLLECT_LTO_WRAPPER=/opt/local/libexec/gcc/x86_64-apple-darwin10/4.7.0/lto-wrapper
Target: x86_64-apple-darwin10
Configured with: ../gcc-4.7.0/configure --prefix=/opt/local
--build=x86_64-apple-darwin10
--enable-languages=c,c++,objc,obj-c++,lto,fortran,java
--libdir=/opt/local/lib/gcc47 --includedir=/opt/local/include/gcc47
--infodir=/opt/local/share/info --mandir=/opt/local/share/man
--datarootdir=/opt/local/share/gcc-4.7 --with-libiconv-prefix=/opt/local
--with-local-prefix=/opt/local --with-system-zlib --disable-nls
--program-suffix=-mp-4.7 --with-gxx-include-dir=/opt/local/include/gcc47/c++/
--with-gmp=/opt/local --with-mpfr=/opt/local --with-mpc=/opt/local
--with-ppl=/opt/local --with-cloog=/opt/local --enable-cloog-backend=isl
--enable-stage1-checking --disable-multilib --enable-lto
--with-as=/opt/local/bin/as --with-ld=/opt/local/bin/ld
--with-ar=/opt/local/bin/ar --with-bugurl=https://trac.macports.org/newticket
--with-pkgversion='MacPorts gcc47 4.7.0_3'
Thread model: posix
gcc version 4.7.0 (MacPorts gcc47 4.7.0_3)


g++-mp-4.7 foo.cpp -o foo -std=c++11


The C++11 standard states "The exception-declaration shall not denote an
incomplete type, an abstract class type, or an rvalue reference type." in
section 15.3, however the attached code compiles.


clang++-mp-3.0 foo.cpp -o foo -std=c++11 gives

foo.cpp:8:19: error: cannot catch exceptions by rvalue reference
    } catch (A && a) {
                  ^


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c++/53371] rvalue reference type as exception-declaration
  2012-05-16  3:30 [Bug c++/53371] New: rvalue reference type as exception-declaration vexocide at gmail dot com
@ 2012-05-16  4:11 ` vexocide at gmail dot com
  2012-05-16 13:22 ` paolo.carlini at oracle dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: vexocide at gmail dot com @ 2012-05-16  4:11 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Jeroen Habraken <vexocide at gmail dot com> 2012-05-16 03:30:16 UTC ---
Created attachment 27416
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27416
minimal example


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c++/53371] rvalue reference type as exception-declaration
  2012-05-16  3:30 [Bug c++/53371] New: rvalue reference type as exception-declaration vexocide at gmail dot com
  2012-05-16  4:11 ` [Bug c++/53371] " vexocide at gmail dot com
@ 2012-05-16 13:22 ` paolo.carlini at oracle dot com
  2012-05-17 15:59 ` paolo.carlini at oracle dot com
  2012-05-17 15:59 ` paolo at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-05-16 13:22 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2012-05-16
                 CC|vexocide at gmail dot com   |
         AssignedTo|unassigned at gcc dot       |paolo.carlini at oracle dot
                   |gnu.org                     |com
   Target Milestone|---                         |4.8.0
     Ever Confirmed|0                           |1

--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-05-16 13:19:10 UTC ---
Mine. Seems just matter of adding a check at the beginning of
expand_start_catch_block


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c++/53371] rvalue reference type as exception-declaration
  2012-05-16  3:30 [Bug c++/53371] New: rvalue reference type as exception-declaration vexocide at gmail dot com
  2012-05-16  4:11 ` [Bug c++/53371] " vexocide at gmail dot com
  2012-05-16 13:22 ` paolo.carlini at oracle dot com
@ 2012-05-17 15:59 ` paolo.carlini at oracle dot com
  2012-05-17 15:59 ` paolo at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-05-17 15:59 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #4 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-05-17 15:57:56 UTC ---
Fixed.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c++/53371] rvalue reference type as exception-declaration
  2012-05-16  3:30 [Bug c++/53371] New: rvalue reference type as exception-declaration vexocide at gmail dot com
                   ` (2 preceding siblings ...)
  2012-05-17 15:59 ` paolo.carlini at oracle dot com
@ 2012-05-17 15:59 ` paolo at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: paolo at gcc dot gnu.org @ 2012-05-17 15:59 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> 2012-05-17 15:56:01 UTC ---
Author: paolo
Date: Thu May 17 15:55:51 2012
New Revision: 187630

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=187630
Log:
/cp
2012-05-17  Paolo Carlini  <paolo.carlini@oracle.com>

    PR c++/53371
    * except.c (is_admissible_throw_operand): Rename to
    is_admissible_throw_operand_or_catch_parameter and handle
    catch parameter too.
    (expand_start_catch_block): Use it.
    (build_throw): Adjust.

/testsuite
2012-05-17  Paolo Carlini  <paolo.carlini@oracle.com>

    PR c++/53371
    * g++.dg/cpp0x/catch1.C: New.

Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/catch1.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/except.c
    trunk/gcc/testsuite/ChangeLog


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-05-17 15:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-16  3:30 [Bug c++/53371] New: rvalue reference type as exception-declaration vexocide at gmail dot com
2012-05-16  4:11 ` [Bug c++/53371] " vexocide at gmail dot com
2012-05-16 13:22 ` paolo.carlini at oracle dot com
2012-05-17 15:59 ` paolo.carlini at oracle dot com
2012-05-17 15:59 ` paolo at gcc dot gnu.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).