Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Tool to convert C99 code to MSVC-compatible C89

branch: master

This branch is 0 commits ahead and 0 commits behind master

Add an assertion if particular indices in an array/struct are duplica…

…tes.

Fix struct/array index lookup if the previous entry used a designated
initializer, but this particular entry didn't. In that case, our index
is the previous member's index + 1, but we used to use the counter as
index, which is wrong.

Also fix the unit test, which contained code triggering both problems,
which ended up going in an infinite loop.
latest commit 47826cc230
Ronald S. Bultje authored December 19, 2012
Octocat-spinner-32 LICENSE Add license and copyright header. August 12, 2012
Octocat-spinner-32 Makefile Don't error out on diff in unittests. October 07, 2012
Octocat-spinner-32 Makefile.w32 Add a Makefile to compile with cl.exe on Windows. October 03, 2012
Octocat-spinner-32 README.md doc: add README December 11, 2012
Octocat-spinner-32 compilewrap.c Don't detect clang as cl.exe. October 07, 2012
Octocat-spinner-32 convert.c Add an assertion if particular indices in an array/struct are duplica… December 19, 2012
Octocat-spinner-32 makedef Don't add ordinals to the def files November 17, 2012
Octocat-spinner-32 unit.c Support designated initializers in compound literals. August 18, 2012
Octocat-spinner-32 unit2.c Add an assertion if particular indices in an array/struct are duplica… December 19, 2012
README.md

c99-to-c89

Tool to convert C99 code to MSVC-compatible C89

Dependencies

c99-to-c89 is based on LibClang, any clang version from 3.1 is known to work.

Usage

c99conv converts preprocessed C sources, the provided c99wrap uses the C preprocessor, converts its output and feeds it to the C compiler.

c99wrap $CC $CFLAGS source

Something went wrong with that request. Please try again.