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

            Bug ID: 60365
           Summary: multiple noreturn attribute specifiers in single
                    declaration doesn't result in a diagnostic
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: filip.roseen at gmail dot com

Created attachment 32233
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32233&action=edit
testcase.cpp

void func [[noreturn, noreturn]] ();

int main () { }

------------------------------------------------------

noreturn shall only be specified once for each declaration it is a part of, as
stated in [dcl.attr.noreturn]p1

  > The attribute-token noreturn specifies that a function does not
  > return. It shall appear at most once in each attribute-list and no
  > attribute-argument-clause shall be present.

Both clang and icc correctly issues a diagnostic when trying to compile the
provided snippet.

Reply via email to