Projects for the C front end

The following are some ideas for C front-end projects to work on.

More warnings

Warn about statements that are undefined because the order of evaluation of increment operators makes a big difference. Here is an example:

*foo++ = hack (*foo);

-Wsequence-point does some of this, but not that particular case.

Changes to support C99 standard

The new version of the C standard (ISO/IEC 9899:1999) requires a number of library changes; these have to be provided by the C library, and not by gcc. In addition, there are also changes to the language proper, and some compiler support is needed for the new library features. An overview of the C99 implementation status is available.

Implement various builtin functions for ISO C99's <tgmath.h>

Design and implement builtin functions that assist in implementing the ISO C99 <tgmath.h> macros. These builtins could be along the general lines of the macros used in glibc 2.2 (for example, the implementation of <tgmath.h> might use __builtin_tgmath_unary_real_only (value, log2f, log2, log2l) to implement the log2 macro), but should be designed so that, if the Annex G imaginary types are implemented in GCC, glibc does not need to change again to allow for them. This means additional functions, beyond those corresponding to the macros in glibc, are needed to handle the trigonometric functions which G.7 specifies have real or imaginary result type for imaginary arguments, but which have complex result type for complex arguments. The design for these builtins should be discussed with the gcc and libc-alpha lists.

Format (printf, scanf and strftime) checking