this is the patch i mentioned several weeks ago. it extends #pragma incomplete to allow -T to be switched off and on for whole libraries (eg, in the Freetype include files), mainly intended for use when the code is imported and so constructed that it is hard to add all required `incomplete' names. Reference: /n/sources/patch/applied/pragincomplete Date: Wed Feb 2 18:24:06 CET 2005 --- /sys/src/cmd/cc/dpchk.c Wed Feb 2 18:24:06 2005 +++ /sys/src/cmd/cc/dpchk.c Wed Feb 2 18:24:06 2005 @@ -447,7 +447,11 @@ s = getsym(); if(s){ - if(s->type == T) + if(strcmp(s->name, "_off_") == 0) + debug['T'] = 0; + else if(strcmp(s->name, "_on_") == 0) + debug['T'] = 1; + else if(s->type == T) diag(Z, "unknown type %s in pragma incomplete", s->name); else s->type->garb |= GINCOMPLETE; --- /sys/man/1/2c Wed Feb 2 18:24:06 2005 +++ /sys/man/1/2c Wed Feb 2 18:24:05 2005 @@ -311,15 +311,27 @@ .B #pragma of the form .EX - #pragma incomplete type + #pragma incomplete \fItype\fP .EE tells the compiler that -.B type +.I type should have its signature calculated as an incomplete type even when it is fully defined. This allows the type signature mechanism to work in the presence -of opaque types declared in header files while their full definitions -are known only to the code which manipulates them. +of opaque types declared in header files, with their full definitions +visible only to the code which manipulates them. +With some imported software it might be necessary to turn off the +signature generation completely for a large body of code (typically +at the start and end of a particular include file). +If +.I type +is the word +.BR _off_ , +signature generation is turned off; if +.I type +is the word +.BR _on_ , +the compiler will generate signatures. .TP \- The C++ comment