[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Usage of "attribute"
From: |
Dr. Torsten Rupp |
Subject: |
Usage of "attribute" |
Date: |
Fri, 29 Oct 2004 16:24:22 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 |
Dear Classpath-members,
after my last update of the Classpath sources I detected some parameters
of functions which are unused and are marked by
__attribute__ ((__unused__)
Unfortunatelly this is not portable to some non-GNU compilers (as I
know... at least I have one C-compiler for ARM which can not handle
this). Can we use a macro for this? E. g.
#ifdef __GNUC__
#define VARIABLE_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
#else
#define VARIABLE_ATTRIBUTE_UNUSED
#endif
A configure-test would also be possible instead "#ifdef __GNUC__".
Another idea would be some construct of the form
if ((parameter)==(parameter));
for each unused parameter. This would avoid a C-compiler warning for
still not implemented functions and keep the prototypes clean
(implemenation later will become simpler, because the header files do
not change).
By,
Torsten
- Usage of "attribute",
Dr. Torsten Rupp <=