[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ctype.h:192: error: parse error before '{' token
From: |
Jeffrey Walton |
Subject: |
Re: ctype.h:192: error: parse error before '{' token |
Date: |
Wed, 17 Jul 2019 21:41:09 -0400 |
On Wed, Jul 17, 2019 at 9:19 PM Paul Eggert <address@hidden> 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__ ));
...
I attached regex-grep.txt because it is small. I can attach
regex.ii.txt , but it is 570K.
Jeff
regex-grep.txt
Description: Text document
Re: ctype.h:192: error: parse error before '{' token, Bruno Haible, 2019/07/17