This is the mail archive of the gcc-patches@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: ebcdic support for binutils...


On Thu, Dec 13, 2001 at 02:59:57PM -0500, DJ Delorie wrote:
> 
> > I guess my question was a general one. What happens when you have fifty 
> > separate cases - in general? Say for checking threading models? Or for checking
> > the OS? I think elif would be extremely helpful here...
> 
> It's not helpful when it won't compile.  Sorry, you just can't use it,
> no matter how much better life would be if we could.

right... but I still think that there is a cleaner alternative.. Isn't:

#if defined (MSDOS)
#define OS_FOUND 1
..
..
..
#endif
#if defined (UNIX)
#define OS_FOUND 1
..
..
..
#endif


#if !defined (OS_FOUND)
#error "No OS found"
#endif

the better way?

Ed


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