Issue: headers may use non-reserved identifiers

Pavel M <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <CAL9Mx1vqcV_cgn3+CnT1RgO4wH3iK1No6qOCThXjaKrJns2h_g@mail.gmail.com>
Hi all,

Issue: headers may use non-reserved identifiers.

Example:
#define _reent 0
#include <stdio.h>

$ gcc t567.c -std=c11
t567.c:1:16: error: expected ‘{’ before numeric constant
    1 | #define _reent 0
      |                ^
t567.c:1:16: error: expected ‘{’ before numeric constant
    1 | #define _reent 0
      |                ^
and so on...

Per C11 _reent, _on_exit_args, etc. are non-reserved identifiers.

Consider fixing.

P.S. Good if it leads to compile time errors, not good if it doesn't (wrong
translation unit produced => wrong code generated => wrong runtime
behavior).

--
Pavel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.