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

Start using C99 #23

Merged
merged 1 commit into from
Nov 8, 2013
Merged

Start using C99 #23

merged 1 commit into from
Nov 8, 2013

Conversation

rui314
Copy link
Contributor

@rui314 rui314 commented Nov 8, 2013

As we discussed, it's probably time to allow C99 features, especially mixing
declarations and code, in Gauche souce code. Using C99 allows us to write more
readable code.

I think that MSVC is the only major C compiler that does not support C99,
but because (1) we are using MinGW for Windows support, and (2) MSVC 2013
started supporting most C99 features, I'd think that wouldn't block us from
migrating to C99.

Compiler may need -std=c99 or -std=gnu99 to turn on C99 support.
AC_PROG_CC_STDC will do that for you if you have autoconf 2.69 or later. We
already have the macro call in configure.ac.

This patch is to convert list.c to C99 as a starter. If it looks good, I'll do
the same thing on other files too.

As we discussed, it's probably time to allow C99 features, especially mixing
declarations and code, in Gauche souce code. Using C99 allows us to write more
readable code.

I think that MSVC is the only major C compiler that does not support C99,
but because (1) we are using MinGW for Windows support, and (2) MSVC 2013
started supporting most C99 features, I'd think that wouldn't block us from
migrating to C99.

Compiler may need -std=c99 or -std=gnu99 to turn on C99 support.
AC_PROG_CC_STDC will do that for you if you have autoconf 2.69 or later. We
already have the macro call in configure.ac.

This patch is to convert list.c to C99 as a starter. If it looks good, I'll do
the same thing on other files too.
shirok added a commit that referenced this pull request Nov 8, 2013
@shirok shirok merged commit a58c849 into shirok:master Nov 8, 2013
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

Successfully merging this pull request may close these issues.

None yet

2 participants