bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: glob.c warnings


From: Tom G. Christensen
Subject: Re: glob.c warnings
Date: Sat, 07 Sep 2013 13:32:55 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130108 Thunderbird/10.0.12

On 09/05/2013 01:05 AM, Eric Blake wrote:
 From c84321367fb6d1dc35c8d04e075f1315eddcc720 Mon Sep 17 00:00:00 2001
From: Eric Blake<address@hidden>
Date: Wed, 4 Sep 2013 17:02:47 -0600
Subject: [PATCH] glob: silence -Wattribute warnings

Colin Watson reported that some versions of gcc warn about
attribute leaf used on a static function, since it has no
effect on anything but external functions.

* posix/glob.c (next_brace_sub, prefix_array, collated_compare):
Use __THROWNL rather than __THROW on static functions.


This broke the build for atleast Solaris and FreeBSD.

Here's an excerpt from a test build on FreeBSD 9.1:

depbase=`echo glob.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`; gcc -DHAVE_CONFIG_H -I. -I.. -DGNULIB_STRICT_CHECKING=1 -D_THREAD_SAFE -g -O2 -MT glob.o -MD -MP -MF $depbase.Tpo -c -o glob.o glob.c && mv -f $depbase.Tpo $depbase.Po
In file included from ./glob.h:380,
                 from glob.c:24:
./glob-libc.h: In function 'rpl_glob':
./glob-libc.h:177: error: expected declaration specifiers before '__THROW'
./glob-libc.h:180: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__THROW' ./glob-libc.h:207: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__THROW'
In file included from glob.c:24:
./glob.h:383: error: storage class specified for parameter '_gl_glob_errfunc_fn'
In file included from glob.c:37:
...
...
glob.c:165: error: storage class specified for parameter 'next_brace_sub'
glob.c:208: error: storage class specified for parameter 'glob_in_dir'
glob.c:210: error: storage class specified for parameter '__glob_pattern_type'
glob.c:213: error: storage class specified for parameter 'prefix_array'
glob.c:214: error: storage class specified for parameter 'collated_compare'
...
...
*** [glob.o] Error code 1


The full details can be seen in the log here:
http://jupiterrise.com/tmp/gnulib-glob-b9ad0444-freebsd91.log

-tgc



reply via email to

[Prev in Thread] Current Thread [Next in Thread]