RCS History

--- pcc_c_language.mdwn 2008/11/01 12:55:07 1.1
+++ pcc_c_language.mdwn 2008/11/01 14:10:10 1.2
@@ -1 +1,10 @@
-[nline function declaration handling]
\ No newline at end of file
+[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.