mercredi 22 avril 2015

Using gcc attributes with C++11 attributes syntax

I was trying to use the gcc attributes with the C++11 syntax. For example something like this:

static void [[used]] foo(void)
{
.
.
.
}

But I get the following:

test.cpp:8:13: warning: ‘used’ attribute ignored [-Wattributes]
static void [[used]] foo(void)
            ^

What's wrong with what I'm doing?

Aucun commentaire:

Enregistrer un commentaire