[cfe-dev] Wrong extern inside no braces linkage specification declaration
sebastian.redl at getdesigned.at
Mon Apr 26 01:39:01 PDT 2010
On Sun, 25 Apr 2010 22:57:58 +0200, Abramo Bagnara
<abramo.bagnara at gmail.com> wrote:
> Currently clang marks these two declarations
> extern "C" int a;
> extern "C" void foo();
> as extern in StorageClassAsWritten, but the inner declarations does not
> have any storage class specified (and C++ standard does not allow any).
> The attached patch wrt r102259 fixes the problem (and do not introduce
> any regressions).
As I explained in Bug 6276, Clang's behavior is correct. 7.5p7 states that
a linkage specifier without braces acts like an extern storage class
More information about the cfe-dev