Back to wiki

RCS History

/ TOP / pcc_c_language.mdwn

Revision 1.6

[inline function declaration handling]

The C99 standard leaves much about the handling of inline declared functions to the implementation, so here is a description of how pcc implements it.  This is supposed to be gcc-compatible when gcc is using the -std=c99 option.

- A function declared with only the inline keyword will create neither internal nor external linkage.
- If declared with the extern keyword the function will have external linkage.
- If declared with the static keyword it will have internal linkage. If never referenced it will never be written out.

Without optimization turned on, a function declared inline will never be inlined.
With optimization (-xinline), pcc will try to inline the function if possible, if not possible a function with a local label will be generated.

[restricted pointers]

The "restrict" keyword is recognized by PCC, but it doesn't currently do anything.

Powered by rcshistory.cgi 0.3