Newsgroups: | comp.arch,comp.compilers |
From: | mw@ipx2.rz.uni-mannheim.de (Marc Wachowitz) |
Followup-To: | comp.compilers |
Keywords: | architecture |
Organization: | --- |
References: | <4074ig$nh7@masala.cc.uh.edu> 95-08-120 |
Date: | Tue, 22 Aug 1995 07:49:20 GMT |
Dennis O'Connor -FT-~ (doconnor@sedona.intel.com) wrote:
> If the C standard specified a flag or pair of flags that the
> compiler would set to indicate whether the target architecture
> was big- or little-endian, that would be a big help.
> So, how about it, GNU and ANSI ? Let's see __BIGEND__
> and __LITTLEEND__ incorporated into the standards.
> Thanks.
My advice for this and similar situations is to write a small program which
tests the cases with which your program should be able to deal, and creates
an include file with the appropriate definitions for the real program. This
approach also works with other languages, where you can't tell something by
asking the compiler, but want to determine it at compile time.
Marc Wachowitz <mw@ipx2.rz.uni-mannheim.de>
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.