Generating Function Prototypes

Alastair Reid reid at reid-consulting-uk.ltd.uk
Wed Jul 3 13:33:00 EDT 2002


>> Of course, this ignores the detail that while the C compilers are
>> generating correct code, they may also be generating warnings about
>> alleged type errors - which can be a bit disconcerting.

> It is an error, not just a warning, if the prototypes don't match.
> GCC will complain loudly if there's a missing 'const' - it won't
> generate any code at all.

Well, if you disable the warning by giving gcc a consistent story,
then the code is correct.  (To give gcc a consistent story, don't
#include any user or system-supplied headers and make sure gcc doesn't
silently #include any of its own (as it likes to do).)

A




More information about the FFI mailing list