Open MPI logo

Hardware Locality Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Hardware Locality Development mailing list

Subject: Re: [hwloc-devel] Attribute unsed not regognized
From: Bert Wesarg (bert.wesarg_at_[hidden])
Date: 2010-03-26 14:03:42


On Fri, Mar 26, 2010 at 15:49, Samuel Thibault <samuel.thibault_at_[hidden]> wrote:
> Bert Wesarg, le Fri 26 Mar 2010 11:09:05 +0100, a écrit :
>> AFAIK the correct usage would be:
>>
>>          int square(int __attribute__ ((__unused__)) arg1, int arg2) {
>> return arg2; }
>>
>> I.e. the attribute is between type and name.
>
> Do you have a reference on this?  For variables, the gcc manual always
> puts them after the name, and in the source code of gcc itself I see it
> there almost all the time... Also, there is an issue with e.g.
>
> void f(void * __attribute__((unused)) p) {
> }
>
> The following
>
> void f(void __attribute__((unused)) * p) {
> }
>
> does pass, but looks odd to me: it's not the data pointed by p that we
> want to qualify as unused... Which ones of the above pass with your gcc?
>
>> Configured with: ../src/configure -v --with-pkgversion='Ubuntu
>> 4.4.1-4ubuntu9'
>
> € gcc --version
> gcc (Debian 4.4.2-9) 4.4.3 20100108 (prerelease)
> € gcc --version
> gcc (Debian 4.3.4-5) 4.3.4
> € gcc-4.5 --version
> gcc-4.5 (Debian 4.5-20100202-1) 4.5.0 20100202 (experimental) [trunk revision 156452]
> $ gcc --version
> gcc (GCC) 3.4.6     (on solaris)
> $ gcc --version
> gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-46)
> $ gcc --version
> gcc (GCC) 4.0.2     (on AIX)
>
> All these don't have any problem with the above.  This really looks
> to me like a bug introduced by Ubuntu, probably along their agressive
> fortifying policies.

Thanks, I will look into this and send it to the ubuntu maintainer.

Bert

>
> Samuel
> _______________________________________________
> hwloc-devel mailing list
> hwloc-devel_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/hwloc-devel
>