[m-dev.] spot the bug
Fergus Henderson
fjh at cs.mu.OZ.AU
Tue Aug 22 11:16:31 AEST 2000
On 22-Aug-2000, Zoltan Somogyi <zs at cs.mu.OZ.AU> wrote:
> On 22-Aug-2000, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> > That should be
> > p = realloc(p, ...);
> > ^^^
>
> I thought the mgnuc script invoked gcc with warning options that would
> tell you when you ignored a non-void return value from a function.
No -- gcc doesn't have any such option. `-Wunused' does not warn
about that. (Probably the reason for this is that it would cause many
spurious warnings for calls to functions like printf(), strcpy(), etc.)
> However, I see that mgnuc has -Wunused commented out, because it
> "causes various spurious warnings". Anyone know how easy it would be
> to get rid of those spurious warnings so we can enable that option?
The simplest way to find out is to enable the warning, and then compile
the compiler (in a couple of different grades and at a couple of
different optimization levels) and see what turns up.
But from memory, I think there may be problems with the macros such as
`ASM_ENTRY' defining unused labels.
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3 | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list