<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Oct 6, 2020 at 10:41 AM Sebastian Huber <<a href="mailto:sebastian.huber@embedded-brains.de">sebastian.huber@embedded-brains.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 06/10/2020 17:34, Joel Sherrill wrote:<br>
<br>
><br>
> On Tue, Oct 6, 2020 at 9:46 AM Sebastian Huber <br>
> <<a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brains.de</a> <br>
> <mailto:<a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brains.de</a>>> wrote:<br>
><br>
> On 06/10/2020 16:37, Joel Sherrill wrote:<br>
><br>
> > How does it break the API? It looks like a change of annotation.<br>
> > Shouldn't be a big deal unless I am misunderstanding something.<br>
><br>
> Please have a look at:<br>
><br>
> <a href="https://lists.rtems.org/pipermail/devel/2020-October/062577.html" rel="noreferrer" target="_blank">https://lists.rtems.org/pipermail/devel/2020-October/062577.html</a><br>
><br>
><br>
> Looks like basically the same code. What does this break? Why the concern?<br>
<br>
The C11/C++11 attribute syntax is less flexible compared to the GNU <br>
attributes. For example:<br>
<br>
echo "_Noreturn void ok(void);" > test.c<br>
<br>
echo "void error(void) _Noreturn;" >> test.c<br>
<br>
gcc test.c<br>
<br>
test.c: In function ‘error’:<br>
test.c:2:1: error: ‘_Noreturn’ in empty declaration<br>
void error(void) _Noreturn;<br>
^~~~<br>
test.c:2:18: warning: empty declaration<br>
void error(void) _Noreturn;<br>
^~~~~~~~~<br>
test.c:2:1: error: expected ‘{’ at end of input<br>
void error(void) _Noreturn;<br>
^~~~<br>
<br></blockquote><div><br></div><div>Yuck. I can see why they did the placement kind of. Makes it like const </div><div>or static but it uses an odd keyword with leading _ and capital letter </div><div>which is rather insane. </div><div><br></div><div>What's the positive value for doing this? Does llvm or some static </div><div>analyser like it better? </div><div><br></div><div>C11 has improvements but it also has more than one thing I</div><div>question if they really thought through. :(</div><div><br></div><div>--joel</div></div></div>