From: Charles Forsyth <forsyth@terzarima.net>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] new compiler...
Date: Fri, 7 Jan 2005 18:05:36 +0000 [thread overview]
Message-ID: <2640c1faf5158159716dc649467787c8@terzarima.net> (raw)
In-Reply-To: <f9021c0a5d1a1e02379559b027768742@quintile.net>
[-- 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
next prev parent reply other threads:[~2005-01-07 18:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-07 17:36 Steve Simon
2005-01-07 18:05 ` Charles Forsyth [this message]
2005-01-07 18:11 ` jmk
2005-01-07 18:15 ` Charles Forsyth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2640c1faf5158159716dc649467787c8@terzarima.net \
--to=forsyth@terzarima.net \
--cc=9fans@cse.psu.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).