[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: RFC: __attribute__ handling
From: |
Tom Tromey |
Subject: |
Re: RFC: __attribute__ handling |
Date: |
01 Oct 2005 14:03:50 -0600 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 |
>>>>> "Twisti" == Christian Thalinger <address@hidden> writes:
Twisti> As we need GNU classpath on some non-GNU/Linux systems, like IRIX, and
Twisti> we do not always use GCC as compiler, we run into some __attribute__
Twisti> problems. When we had our own classpath version, i used a configure
Twisti> macro which does actually the same as the AC_C_INLINE. How should we
Twisti> address that?
One typical way is to find a header that is used everywhere and add:
#ifndef __GCC__
#define __attribute__()
#endif
I don't think we have a header like this other than config.h.
Adding non-configure-generated defines there is mildly frowned upon
but can be done.
FWIW, one nice thing about adding defines instead of using plain
__attribute__ everywhere is that you can make the attributes
conditional on gcc version. This doesn't seem to have affected us yet
though.
Tom