Fail-Safe C: Usage

Compiling single file, or multiple files

The driver “fscc” can be used just in the common compiler interface. For example, the command

 fscc -o hello hello.c

compiles the source file “hello.c” and output the executable file to the file “hello”.

If your project has multiple file, you can use compiler and linker separately, like

 fscc -c main.c
 fscc -c libmine.c
 fscc -o myprogram main.o libmine.o

and the driver will call either the compiler and the linker appropriately.

Recognized options

Current driver and compiler understands the following standard options.

Specify the name of the final output file.
Stop process after compilation: no linking.
Stop process after preprocessor: no compilation, no linking.
Add the directory dir to the search path of the include files.
Add the directory dir to the search path of the library files.
Add the library file libfile.a in the library search path to be linked.
Generating debugging code. It emit very slow executive, but several debugging/assertion features are enabled. Note: if -g is used for compilation, it is also needed for linking.
Define the symbol for the preprocessor.
Define the symbol for the preprocessor.

In addition to above, the compiler also accepts the following non-standard options.

Stop process after Fail-Safe C processing. Backend native code generation is not performed. Output file extension will be “.safe.c”.
Keep all intermediately generated files in the current directory. Useful if you want to use debuggers.
Pass options opts to the backend native code generator (gcc).
Pass options opts to the backend native code linker.
specify some options for compilers.



Current version of the Fail-Safe C Compiler supports basic use of GNU AUTOCONF. However, due to dirty tricks used by AUTOCONF, it needs special workaround. Usually, invoking the configure with the following options may work:

 env CC=/path/to/fscc CFLAGS='-fgnu-autoconf-workaround' \
     ./configure --build=i386-linux


  • Current support for standard-library functions are limited. See this page for current status and future plan.
  • Some programs may fail accessing 4294967295th or 4294967292nd offset of the memory. This is because the programs incorrectly uses address of the -1st element of arrays as a guardian. It can be workaround by specifying -fptr-compare-signed-offset to the compiler.