All Questions
3
questions
2
votes
1
answer
177
views
error: must specify at least one argument for '...' parameter of variadic macro
You can define a variadic macro in C like:
#define F(x, ...) f(x, __VA_ARGS__)
But calling F as F(a) results in the macro expansion f(a,) which would not compile.
So C23 includes __VA_OPT__ to ...
0
votes
2
answers
113
views
Consolidating GNU C's and C23's deprecated function attribute
The problem I am facing when using the below macro
// Assume that __GNUC__ or __clang__ is defined.
#if defined(__has_c_attribute)
#if __has_c_attribute(deprecated)
#define ...
0
votes
2
answers
474
views
Regarding mainstream compilers and int main(){} in C23
My program:
int main(){}
In upcoming C23, non-prototype and "K&R style" functions are removed. I realize that C23 is not yet formally released, but the current behavior of gcc and clang ...