Is this identifier non-problematic:
_var
C11, 7.1.3 Reserved identifiers, 1
Does it follow from this that user-defined identifiers beginning with a single underscore are non-problematic?

Is this identifier non-problematic:
_var
C11, 7.1.3 Reserved identifiers, 1
Does it follow from this that user-defined identifiers beginning with a single underscore are non-problematic?
0 Answer
No, there is a problem.
You forgot to include one more quote
So you may not declare an identifier beginning with one underscore followed by an uppercase letter.
In general it is a bad style of programming using identifiers starting with underscore because the reader of the code can think that this identifier is reserved by the implementation.
No, that list item merely tells you certain things are problematic. It makes no statement that other things are non-problematic.
The same paragraph tells you that all identifiers listed in the header subclauses are reserved if header that declares them is included, possibly for any use, so they are problematic. There are additional issues listed in that paragraph.
C 2018 6.4.2.1 5 and 6 tell you that identifiers longer than the minimums listed in 5.2.4.1 (63 characters for internal identifiers, 31 for external) may be a problem; the behavior is not defined if two identifiers differ only beyond the limit of significant characters the implementation imposes.
C 2018 6.4.2 also allows identifiers with implementation-defined characters, so such identifiers may work in some implementations and not others.
Inside the main function or user defined function, you can write like that
You won't get any compile error.
int main()
{
int _var;
float _var1;
}
Yes. As long as:
_
is followed by neither capital nor another underscoreE.g.
struct X { int _a; };
int main() { int _a; }
void foo(int _a);
这家伙很懒,什么都没留下...