tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

eliminate gcc extension in crt0.c

A few ports are using the ({ ... }) gcc extension in crt0.c.  Since the other 
ports don't require it, I assume that gcc doesn't optimise away this code any 
longer.  The affected ports are arm32, armelf, i386, m68k, sh3 and vax.

I've tested the following code on i386 4.0 and cats 3.1, and the problem 
doesn't exist.

Can we eliminate this gccism, or at least test if the compiler is actually gcc?

#include <stdio.h>

#if 1
extern int _DYNAMIC __weak_reference(_DYNAMIC);
extern int _DYNAMIC;

        if (&_DYNAMIC)
        return 0;

-- Gregory McGarry <>

      Get the name you always wanted with the new y7mail email address.

Home | Main Index | Thread Index | Old Index