[mercury-users] compilation problem, all, some

Maurizio Colucci seguso.forever at tin.it
Sat Jul 17 07:24:44 AEST 2004


On Friday 16 July 2004 02:07, Zoltan Somogyi wrote:
> > main_init.c:784: warning: dereferencing type-punned pointer will break
> > strict-aliasing rules
> > main_init.c:786: warning: dereferencing type-punned pointer will break
> > strict-aliasing rules

These are warnings, but the following is an error:

> > main_init.o(.text+0x179): In function `mercury_init':
> > : undefined reference to `<predicate 'main'/2 mode 0>'
>
> You get these errors because gcc 3.4 assumes -fstrict-aliasing by default
> at -O2, but the code generated by the Mercury compiler doesn't abide by
> the rules this requires. (This is by design; we use C as portable
> assembler.) You can ignore all such errors from code generated by the
> Mercury compiler by specifying --fno-strict-aliasing. I committed a patch
> last week to detect the presence of this flag, and have mgnuc turn it on by
> default if needed.


I don't understand... I tried 

  mmc --fno-strict-aliasing main.m

but the option is not accepted by mmc. 

Could you please give me the full command line needed to compile?

Thank you very much. Mau

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



More information about the users mailing list