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