public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/52659] New: GCC fails to reject a deleted function definition which is not the first declaration
@ 2012-03-21 22:57 illissius at gmail dot com
  2012-03-21 23:25 ` [Bug c++/52659] " redi at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: illissius at gmail dot com @ 2012-03-21 22:57 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 52659
           Summary: GCC fails to reject a deleted function definition
                    which is not the first declaration
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: illissius@gmail.com


C++11 8.4.3.4:
"A deleted definition of a function shall be the first declaration of the
function or, for an explicit specialization of a function template, the first
declaration of that specialization. [ Example:
struct sometype {
  sometype();
};
sometype::sometype() = delete; // ill-formed; not first declaration
— end example ]"


$ cat bug.cpp
struct sometype {
  sometype();
};

sometype::sometype() = delete;

$ g++ bug.cpp -std=c++11 -c
$ g++ --version
g++ (GCC) 4.7.0 20120314 (prerelease)
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


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

* [Bug c++/52659] GCC fails to reject a deleted function definition which is not the first declaration
  2012-03-21 22:57 [Bug c++/52659] New: GCC fails to reject a deleted function definition which is not the first declaration illissius at gmail dot com
@ 2012-03-21 23:25 ` redi at gcc dot gnu.org
  2015-03-19 12:50 ` paolo.carlini at oracle dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: redi at gcc dot gnu.org @ 2012-03-21 23:25 UTC (permalink / raw)
  To: gcc-bugs

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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |accepts-invalid
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-03-21
                 CC|                            |jason at gcc dot gnu.org
     Ever Confirmed|0                           |1


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

* [Bug c++/52659] GCC fails to reject a deleted function definition which is not the first declaration
  2012-03-21 22:57 [Bug c++/52659] New: GCC fails to reject a deleted function definition which is not the first declaration illissius at gmail dot com
  2012-03-21 23:25 ` [Bug c++/52659] " redi at gcc dot gnu.org
@ 2015-03-19 12:50 ` paolo.carlini at oracle dot com
  2015-03-19 13:01 ` paolo at gcc dot gnu.org
  2015-03-19 13:23 ` paolo.carlini at oracle dot com
  3 siblings, 0 replies; 5+ messages in thread
From: paolo.carlini at oracle dot com @ 2015-03-19 12:50 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52659

--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> ---
This is fixed for 5.0. I'm adding the testcase and closing the bug.


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

* [Bug c++/52659] GCC fails to reject a deleted function definition which is not the first declaration
  2012-03-21 22:57 [Bug c++/52659] New: GCC fails to reject a deleted function definition which is not the first declaration illissius at gmail dot com
  2012-03-21 23:25 ` [Bug c++/52659] " redi at gcc dot gnu.org
  2015-03-19 12:50 ` paolo.carlini at oracle dot com
@ 2015-03-19 13:01 ` paolo at gcc dot gnu.org
  2015-03-19 13:23 ` paolo.carlini at oracle dot com
  3 siblings, 0 replies; 5+ messages in thread
From: paolo at gcc dot gnu.org @ 2015-03-19 13:01 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52659

--- Comment #2 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> ---
Author: paolo
Date: Thu Mar 19 11:02:47 2015
New Revision: 221513

URL: https://gcc.gnu.org/viewcvs?rev=221513&root=gcc&view=rev
Log:
2015-03-19  Paolo Carlini  <paolo.carlini@oracle.com>

    PR c++/52659
    * g++.dg/cpp0x/deleted11.C: New.

Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/deleted11.C
Modified:
    trunk/gcc/testsuite/ChangeLog


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

* [Bug c++/52659] GCC fails to reject a deleted function definition which is not the first declaration
  2012-03-21 22:57 [Bug c++/52659] New: GCC fails to reject a deleted function definition which is not the first declaration illissius at gmail dot com
                   ` (2 preceding siblings ...)
  2015-03-19 13:01 ` paolo at gcc dot gnu.org
@ 2015-03-19 13:23 ` paolo.carlini at oracle dot com
  3 siblings, 0 replies; 5+ messages in thread
From: paolo.carlini at oracle dot com @ 2015-03-19 13:23 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52659

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|---                         |5.0

--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Done.


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

end of thread, other threads:[~2015-03-19 11:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-21 22:57 [Bug c++/52659] New: GCC fails to reject a deleted function definition which is not the first declaration illissius at gmail dot com
2012-03-21 23:25 ` [Bug c++/52659] " redi at gcc dot gnu.org
2015-03-19 12:50 ` paolo.carlini at oracle dot com
2015-03-19 13:01 ` paolo at gcc dot gnu.org
2015-03-19 13:23 ` 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).