9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] new compiler...
@ 2005-01-07 17:36 Steve Simon
  2005-01-07 18:05 ` Charles Forsyth
  0 siblings, 1 reply; 4+ messages in thread
From: Steve Simon @ 2005-01-07 17:36 UTC (permalink / raw)
  To: 9fans

Hi,

I am trying to push some old code through the new
compilers which are reporting loads of "incompatible
type signatures" errors.

When I look at the code I cannot see what the problem is.

Could somone summerise in a sentence or two what the 
increase in sensitivity to type errors is?

BTW the dynld(2) manpage referenced in ld(2) seems not
to have made it out.

Thanks

-Steve


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9fans] new compiler...
  2005-01-07 17:36 [9fans] new compiler Steve Simon
@ 2005-01-07 18:05 ` Charles Forsyth
  2005-01-07 18:11   ` jmk
  2005-01-07 18:15   ` Charles Forsyth
  0 siblings, 2 replies; 4+ messages in thread
From: Charles Forsyth @ 2005-01-07 18:05 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 1144 bytes --]

it might be caused by a genuine error (usually an extern declared differently in two .c files
rather than in a common .h), or often by a construction similar to the following:

	file1.h:
		typedef struct Secret Secret;

		void fred(Secret*);

	file1.c
		#include "file1.h"

		/* use fred */

	file2.c
		#include "file1.h"

		struct Secret {
			...
		};

		void
		fred(Secret *s)
		{
			...
		}

so that in scope file1.c the signature of Secret (and thus fred) is different
from that in file2.c.  follow the declaration of Secret in file1.h by

	#pragma incomplete Secret

to ensure that although file2.c declares Secret in full,
the full declaration is ignored when calculating
the  signature of Secret and fred, producing the same result
for signof in file2 as in file1.c

(there are examples in the kernel sources, see portdat.h)

i added a way for the #pragma to switch off the checking for
basket cases such as freetype, but that change seems to have gone missing,
even from my own copies.
i'll find it.

you can comment out the -T option in CFLAGS in /sys/src/mkfile.proto
if you're in a hurry

[-- Attachment #2: Type: message/rfc822, Size: 2916 bytes --]

From: "Steve Simon" <steve@quintile.net>
To: 9fans@cse.psu.edu
Subject: [9fans] new compiler...
Date: Fri, 7 Jan 2005 17:36:31 0000
Message-ID: <f9021c0a5d1a1e02379559b027768742@quintile.net>

Hi,

I am trying to push some old code through the new
compilers which are reporting loads of "incompatible
type signatures" errors.

When I look at the code I cannot see what the problem is.

Could somone summerise in a sentence or two what the 
increase in sensitivity to type errors is?

BTW the dynld(2) manpage referenced in ld(2) seems not
to have made it out.

Thanks

-Steve

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9fans] new compiler...
  2005-01-07 18:05 ` Charles Forsyth
@ 2005-01-07 18:11   ` jmk
  2005-01-07 18:15   ` Charles Forsyth
  1 sibling, 0 replies; 4+ messages in thread
From: jmk @ 2005-01-07 18:11 UTC (permalink / raw)
  To: 9fans

That's my fault, the setting of the -T option to CFLAGS in /sys/src/mkfile.proto
was not supposed to escape to sources yet. Take it out if it causes problems.

--jim


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9fans] new compiler...
  2005-01-07 18:05 ` Charles Forsyth
  2005-01-07 18:11   ` jmk
@ 2005-01-07 18:15   ` Charles Forsyth
  1 sibling, 0 replies; 4+ messages in thread
From: Charles Forsyth @ 2005-01-07 18:15 UTC (permalink / raw)
  To: 9fans

>>i added a way for the #pragma to switch off the checking for
>>basket cases such as freetype, but that change seems to have gone missing,
>>even from my own copies.

i've found it in the dump, so i'll submit a patch shortly.



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-01-07 18:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-07 17:36 [9fans] new compiler Steve Simon
2005-01-07 18:05 ` Charles Forsyth
2005-01-07 18:11   ` jmk
2005-01-07 18:15   ` Charles Forsyth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).