On Wed, Jul 17, 2019 at 9:41 PM Jeffrey Walton <noloa...@gmail.com> wrote: > > On Wed, Jul 17, 2019 at 9:19 PM Paul Eggert <egg...@cs.ucla.edu> wrote: > > > > Jeffrey Walton wrote: > > > It looks like the glibc macro is a little simpler and lacks the > > > attributes: > > > > Thanks. Can you give the preprocessor output for a declaration that fails > > with > > Gnulib? > > __attribute__ ((nothrow)) seems to be causing the problems. > > First, cd into the problem directory, then -E regex.c using same > options/flags: > > $ cd gettext-0.20.1/gettext-tools/libgrep > $ gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -I.. -I../gnulib-lib > -I../gnulib-lib -I../intl -DIN_GETTEXT_TOOLS_LIBGREP=1 > -I/usr/local/include -DNDEBUG -g2 -O2 -fPIC -pthread -E regex.c > > regex.ii.txt > > Second, grep on the throw: > > $ grep -B 2 -A 2 throw regex.ii.txt > regex-grep.txt > $ cat regex-grep.txt > extern int isalnum (int) __attribute__ ((__nothrow__ )); > extern int isalpha (int) __attribute__ ((__nothrow__ )); > extern int iscntrl (int) __attribute__ ((__nothrow__ )); > extern int isdigit (int) __attribute__ ((__nothrow__ )); > extern int islower (int) __attribute__ ((__nothrow__ )); > ... >
This is interesting. The GCC man pages for 3.3.1 (and onwards) says nothrow is a supported attribute: https://gcc.gnu.org/onlinedocs/gcc-3.3.1/gcc/Function-Attributes.html It looks like a copy/paste error. Jeff