[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: __attribute__ ((__format__)) in error.h [was: m4-1.4.7 build feedbac
From: |
Eric Blake |
Subject: |
Re: __attribute__ ((__format__)) in error.h [was: m4-1.4.7 build feedback] |
Date: |
Wed, 27 Sep 2006 18:49:53 -0600 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.7) Gecko/20060909 Thunderbird/1.5.0.7 Mnenhy/0.7.4.666 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
[Adding the lists back to the reply, for closure on this topic]
According to Nelson H. F. Beebe on 9/27/2006 6:19 AM:
> About the build of m4-1.4.7 with sunc89 on GNU/Linux IA-32 Fedora
> Core 5:
>
>>> Still, the fact that it is only complaining about verror.h, and not
>>> error.h, makes me wonder if something in <stdarg.h> is causing us grief.
>>> What happens if you rearrange the order of the 2 #includes in verror.h?
>
> Here is what happens:
>
> % make verror.o
> /opt/sun/sunstudiomars/bin/sunc89 -DHAVE_CONFIG_H -I. -I. -I..
> -I/usr/local/include -c verror.c
> "verror.h", line 36: warning: attribute parameter "printf" is undefined
> "verror.h", line 48: warning: attribute parameter "printf" is undefined
> "/usr/include/stdlib.h", line 712: syntax error before or at: _Pragma
> c89: acomp failed for verror.c
> make: *** [verror.o] Error 2
>
> It is still earlier days for the Sun compilers on GNU/Linux, and the
> support for the nonstandard __attributes__ and __Pragma extensions of
> gcc are new with this release. I wouldn't worry too much, especially
> since suncc and sunc99 worked fine.
Thanks for that followup. For now, I will just leave verror.h as-is; if,
as you say, Sun is likely to fix their compiler accordingly, and as long
as you have a backup compiler, I am not too worried about trying to work
around this issue.
>
> As an experiment, I ran the preprocessors from sun{c89,cc,c99}
> and compared the output:
>
> % diff verror.i-c89 verror.i-cc
> 772,773d771
> < # 148
> <
> 819,820d816
> < # 307
> <
> 2620c2616,2619
> < extern int mkstemp ( char * __template ) _Pragma ( "redefine_extname
> mkstemp mkstemp64" )
> ---
> > extern int mkstemp ( char * __template )
> > # pragma redefine_extname mkstemp mkstemp64
> > # 712
> >
>
> % diff verror.i-c99 verror.i-cc
> [no output]
>
> Further investigation shows that with gcc, suncc, and sunc99,
> _Pragma("xxx") expands to
>
> # pragma xxx
>
> while in sunc89, it is left unexpanded.
>
- --
Life is short - so eat dessert first!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFFGxww84KuGfSFAYARAh1gAJ0eyQWzkAiIe2kUC3LKfiocKewaDgCffj5a
AhD7rbLfp6VqOjxxPlywvjw=
=GBFt
-----END PGP SIGNATURE-----
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: __attribute__ ((__format__)) in error.h [was: m4-1.4.7 build feedback],
Eric Blake <=