[cfe-dev] Attribute on constructor parameter rejected
Guillaume Papin
guillaume.papin at epitech.eu
Thu Sep 5 08:49:48 PDT 2013
Hi,
While testing some code with attributes I found the following that looks
like a bug to me:
$ clang-check /tmp/unused.cpp -- -std=c++11
struct AB {
AB([[gnu::unused]] int i) {}
// ^~~~~~~~~~~~~~~ /tmp/unused.cpp:2:5: error: an attribute list cannot appear here
void f([[gnu::unused]] int i) {} // no error for this line
};
Do constructors have different parameter-declaration-list than member
functions?
--
Guillaume Papin
More information about the cfe-dev
mailing list