[m-rev.] for review: fix link errors in profiling grades

Zoltan Somogyi zs at cs.mu.OZ.AU
Thu Aug 15 20:34:43 AEST 2002


On 15-Aug-2002, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> Calling a function via a prototype which is different than
> the one it was defined with violates the C standard, so this
> is definitely problematic.

Why? In the hlc grades, these functions should never be called. That's why
their bodies call MR_fatal_error.

> Now, if that is the intent, then at very least there should be
> an XXX comment explaining that it doesn't conform with the C
> standard and explaining why this is justified.

OK, I added an explanation:

    # We generate prototypes for these functions before the definition
    # to shut up the warning you would otherwise get.
    #
    # Note that the types in the prototype and the definition are
    # lies. This is OK, because the only reason why we have these
    # functions is that in the non-deep profiling grades, we need
    # their addresses, because the library/profiling_builtin.m declares
    # the corresponding predicates. These functions should never be
    # called, since the combination of hlc and deep profiling is not
    # (yet) supported.

Zoltan.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list