This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Will Apple still support GCC development?


Mirza Hadzic wrote:

A big endian system is indispensible if you are a compiler writer, because little endian hardware hides too many programmer errors

Can you show example(s) where little endian hides errors? Just curious...

Sorry, I was already asleep when your mail arrived ...


main()
{
	long blah;

(void) foo(&blah);

        printf("%ld\n", blah);
}

.... different file ....

foo(int *bar)
{
	*bar = 42;
}

Works on ILP32 mode machines (both endiannesses), "works" on I32LP64 mode machines (little endian), fails miserably on I32LP64 mode machines (big endian) *as it should*.

--
Toon Moene - e-mail: toon@moene.indiv.nluug.nl - phone: +31 346 214290
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
A maintainer of GNU Fortran 95: http://gcc.gnu.org/fortran/
Looking for a job: Work from home or at a customer site; HPC, (GNU) Fortran & C



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]