Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C99 #10

Closed
ghost opened this issue Oct 13, 2015 · 4 comments
Closed

C99 #10

ghost opened this issue Oct 13, 2015 · 4 comments

Comments

@ghost
Copy link

ghost commented Oct 13, 2015

How about to explicitly set C standard to at least C99 ?

Because, for example buffer.c uses vsnprintf(), va_copy().
The function and macro conform to ISO/IEC 9899:1999 ("ISO C99").

see: http://en.cppreference.com/w/c/io/vfprintf
and http://en.cppreference.com/w/c/variadic/va_copy

@faelys
Copy link
Owner

faelys commented Oct 14, 2015

I don't understand exactly what you are suggesting.

My code does follow C99 standard, chosen mostly because of the significant improvements over C89 (like va_copy or fixed-size integers) while the newer standard didn't exist yet.

But what do you mean by "explicitly set[ting] C standard"?

@ghost
Copy link
Author

ghost commented Oct 14, 2015

Sorry for not being clear.
I am just suggesting to add -std=c99 option to CFLAGS in *makefiles.

@ghost
Copy link
Author

ghost commented Oct 14, 2015

...and GCC 4.X.X uses by default gnu90 + some C99 features,
but 5.X.X and Clang use gnu11 by default.

It compiles fine with GCC 4.X.X, so it is just to be more clear with this version. )

@ghost
Copy link
Author

ghost commented Oct 14, 2015

merci

@ghost ghost closed this as completed Oct 14, 2015
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant