<div dir="ltr">On Thu, Sep 5, 2013 at 12:50 PM, Guillaume Papin <span dir="ltr"><<a href="mailto:guillaume.papin@epitech.eu" target="_blank">guillaume.papin@epitech.eu</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hum, I updated yesterday so it's quite recent. I tried the following<br>

with both my system-wide install of clang (version 3.2) and the one I<br>
built after my update yesterday:<br>
<br>
  [papin_g:~/GSoC/build]$ cat /tmp/gnu-unused.cpp<br>
<div class="im">  struct AB {<br>
    AB([[gnu::unused]] int i) {}<br>
</div><div class="im">    void f([[gnu::unused]] int i) {} // no error for this line<br>
  };<br>
</div>  [papin_g:~/GSoC/build]$ ./bin/clang++ -std=c++11 -fsyntax-only /tmp/gnu-unused.cpp<br>
  /tmp/gnu-unused.cpp:2:6: error: expected member name or ';' after declaration specifiers<br>
<div class="im">    AB([[gnu::unused]] int i) {}<br>
</div>    ~~ ^<br>
  /tmp/gnu-unused.cpp:2:6: error: an attribute list cannot appear here<br>
<div class="im">    AB([[gnu::unused]] int i) {}<br>
</div>       ^~~~~~~~~~~~~~~<br>
  /tmp/gnu-unused.cpp:2:22: error: expected ')'<br>
<div class="im">    AB([[gnu::unused]] int i) {}<br>
</div>                       ^<br>
  /tmp/gnu-unused.cpp:2:5: note: to match this '('<br>
<div class="im">    AB([[gnu::unused]] int i) {}<br>
</div>      ^<br>
  3 errors generated.<br>
<br>
<br>
I will update Clang tomorrow and see if the problem persists. Maybe it's<br>
only me and I checked out at the wrong time or it's has been fixed since<br>
yesterday.</blockquote><div><br></div><div>This was a bug in our disambiguation of constructor / non-constructor declarations. Fixed in r190111, thanks.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div class="im">
Aaron Ballman <<a href="mailto:aaron@aaronballman.com">aaron@aaronballman.com</a>> writes:<br>
<br>
> On Thu, Sep 5, 2013 at 11:49 AM, Guillaume Papin<br>
> <<a href="mailto:guillaume.papin@epitech.eu">guillaume.papin@epitech.eu</a>> wrote:<br>
>> Hi,<br>
>><br>
>> While testing some code with attributes I found the following that looks<br>
>> like a bug to me:<br>
>><br>
>>   $ clang-check /tmp/unused.cpp -- -std=c++11<br>
>><br>
>>   struct AB {<br>
>>     AB([[gnu::unused]] int i) {}<br>
>>     // ^~~~~~~~~~~~~~~ /tmp/unused.cpp:2:5: error: an attribute list cannot appear here<br>
>><br>
>>     void f([[gnu::unused]] int i) {} // no error for this line<br>
>>   };<br>
>><br>
>> Do constructors have different parameter-declaration-list than member<br>
>> functions?<br>
><br>
> They do not -- are you using ToT?  I get no errors with your code on a<br>
> relatively recent build.<br>
><br>
> ~Aaron<br>
><br>
<br>
</div><span class=""><font color="#888888">--<br>
Guillaume Papin<br>
</font></span><div class=""><div class="h5"><br>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
</div></div></blockquote></div><br></div></div>