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: [PATCH] AmigaOS 4 port contribution


kenner@vlsi1.ultra.nyu.edu (Richard Kenner) writes:

> At a first glance, this code has numerous (nearly one per line) violations
> of the coding standard.

Could you please be a little more specific?  In general I've tried to
adhere to the coding standard, but there might be some rule which I
have missed.  It's a bit difficult to fix it from such a vague
statement though.  Please point out the specific rule which you feel
has been violated, and in which areas, if possible.


> Indeed the #ifdefs are a serious problem.
> 
>     +#ifdef TARGET_AMIGAOS_DECL_ATTRIBUTES
> 
> We don't have this sort of target-specific coding in front ends.  You need
> to figure out a portable way of doing this.

Well, the code is portable, it's just that since the attribute is only
defined on AmigaOS it seems a bit silly to do the check for it on all
targets.  If you feel more comfortable with having the code there
without the ifdefs, that's fine with me.  The usefulness of the
language extension is not really limited to AmigaOS anyway, you could
use it with the JNI (Java Native Interface) for example, which defines
similar interface structs.

The thing has to be done in the front end though, since the extra
argument has to be included when doing check_function_arguments().
Of course, I can move the actual code to the backend and make a call
from the front end, but that somehow seems like a layering violation.


  // Marcus



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