https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79458
Bug ID: 79458
Summary: attributes on constructor between class name and
parameter list not accepted
Product: gcc
Version: 7.0.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: jplejacq at quoininc dot com
Target Milestone: ---
Compiling the following with -std='c++1z' -W'all' -W'extra':
class test {
test [[gnu::nonnull]] (char * arg);
};
test::test(char * arg) {
}
results in the following errors:
!!error: candidates are: constexpr test::test(test&&)
x86-64 gcc 7 (snapshot)!!error: constexpr test::test(const test&)
x86-64 gcc 7 (snapshot)!!error: constexpr test::test()
3
test [[gnu::nonnull]] (char * arg);
x86-64 gcc 7 (snapshot)!!error: expected unqualified-id before 'char'
x86-64 gcc 7 (snapshot)!!error: expected ')' before 'char'
https://godbolt.org/g/sgdgNy