This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/86561] New: a function definition must occur in a standalone declaration


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

            Bug ID: 86561
           Summary: a function definition must occur in a standalone
                    declaration
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zhonghao at pku dot org.cn
  Target Milestone: ---

The code is as follow:

struct S { int f(), g() = delete; };

g++ accepts the code, but clang++ rejects it:

error: '= delete' is a function definition and must occur in a
      standalone declaration
struct S { int f(), g() = delete; };
                          ^
1 error generated.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]