[m-dev.] for review: ANSI C fixes for none.x grades
Fergus Henderson
fjh at cs.mu.OZ.AU
Thu Nov 25 14:14:01 AEDT 1999
On 25-Nov-1999, Peter Ross <petdr at cs.mu.OZ.AU> wrote:
> On 25-Nov-1999, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> > On 25-Nov-1999, Peter Ross <petdr at cs.mu.OZ.AU> wrote:
> > > Ensure that the none.gc and none grades compile using a compiler
> > > other than gcc.
> >
> > That looks good, thanks Pete!
> >
> > > compiler/export.m:
> > > Remove a duplicate label definition.
> >
> > s/definition/declaration/
> >
> > Are you sure that the label declaration there is not needed?
>
> No.
>
> > Can you please test compiling some simple file using
> > `pragma export' (e.g, export_test and pragma_import_tests
> > in tests/hard_coded) with `--split-c-files'?
>
> Yes export_test.m will fail because the symbol no longer exists.
>
> It is safe to use Declare_entry, just not Declare_static. Hence my
> question: is it possible for something to be Declare_static and for this
> to be the only declaration?
No -- in llds_out.m, in output_single_c_file, the first thing it does
is to calls gather_c_labels and then output_c_label_decl_list
to output declarations of all the labels defined in that C file.
So yes, if it is Declare_static, then there will already be a declaration
for it at the start of the C file, so there's no need to put a declaration
here. The declaration here is only needed for the case where it is
Declare_entry.
--
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