Miscellaneous interesting things
Tony Balinski
ajbj at free.fr
Tue Oct 30 17:45:28 CET 2007
Quoting Andrew Hood <ajhood at fl.net.au>:
> Andrew Hood wrote:
> I now have a minimal set of changes against CVS HEAD ( hopefully
> available from http://andyhood.net/cvs-2007-10-28-11-43-17UTC.diff.gz )
> allowing nedit to compile with
>
> CC=gcc -Wuninitialized -Wall -W -Werror -D_U_='__attribute((unused))'
>
> on Linux with gcc 2.95.3 and OpenMotif 2.1.30 and with gcc 4.1.2 and
> OpenMotif 2.3.0. I have not as yet fixed all the other Makefiles.
Don't much like these, I must say. Can't we just wrap the variable name in
a function-style macro as follows:
gcc ... '-D_U_(var)='
then have function arglists such as
int aFunc(XtPointer _U_(unused1), UserArg _U_(unused2));
and for compilers that don't like unnnamed args, use '-D_U_(var)=var'
instead?
Tony
More information about the Develop
mailing list