From unknown Tue Jun 17 01:33:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24323: "regcomp.c", line 467: error: syntax error before or at: preg Resent-From: Dennis Clarke Original-Sender: "Debbugs-submit" Resent-CC: bug-grep@gnu.org Resent-Date: Sun, 28 Aug 2016 03:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 24323 X-GNU-PR-Package: grep X-GNU-PR-Keywords: To: 24323@debbugs.gnu.org X-Debbugs-Original-To: bug-grep@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.147235573712497 (code B ref -1); Sun, 28 Aug 2016 03:43:02 +0000 Received: (at submit) by debbugs.gnu.org; 28 Aug 2016 03:42:17 +0000 Received: from localhost ([127.0.0.1]:42314 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bdqzA-0003FU-Of for submit@debbugs.gnu.org; Sat, 27 Aug 2016 23:42:16 -0400 Received: from eggs.gnu.org ([208.118.235.92]:59689) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bdqz8-0003FG-Sy for submit@debbugs.gnu.org; Sat, 27 Aug 2016 23:42:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bdqz2-0005lj-Mc for submit@debbugs.gnu.org; Sat, 27 Aug 2016 23:42:09 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:60491) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bdqz2-0005lf-JI for submit@debbugs.gnu.org; Sat, 27 Aug 2016 23:42:08 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50658) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bdqz0-0002rJ-Gd for bug-grep@gnu.org; Sat, 27 Aug 2016 23:42:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bdqyw-0005lC-8S for bug-grep@gnu.org; Sat, 27 Aug 2016 23:42:05 -0400 Received: from atl4mhob16.myregisteredsite.com ([209.17.115.109]:40096) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bdqyw-0005ko-3U for bug-grep@gnu.org; Sat, 27 Aug 2016 23:42:02 -0400 Received: from mailpod.hostingplatform.com ([10.30.77.35]) by atl4mhob16.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id u7S3fvk9022480 for ; Sat, 27 Aug 2016 23:41:57 -0400 Received: (qmail 16463 invoked by uid 0); 28 Aug 2016 03:41:57 -0000 X-TCPREMOTEIP: 99.247.223.96 X-Authenticated-UID: dclarke@blastwave.org Received: from unknown (HELO ?172.16.35.41?) (dclarke@blastwave.org@99.247.223.96) by 0 with ESMTPA; 28 Aug 2016 03:41:57 -0000 From: Dennis Clarke Message-ID: <16a98d34-c0b7-de96-5788-c105125742df@blastwave.org> Date: Sat, 27 Aug 2016 23:40:45 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) lib/regcomp.c will not compile with C99 strict compiler because of the usage of the non-standard "__restrict". I question the use here of the "restrict" for the purpose of optimization so I compiled and tested 2.25 both with and without the "restrict" and there was no measurable difference. The testsuite passes fully regardless. We may simply change "__restrict" to the C99 spec clean "restrict" or remove it entirely with no worries. --- ./lib/regcomp.c_backup Sun Apr 10 16:50:01 2016 +++ ./lib/regcomp.c Sun Aug 28 02:35:43 2016 @@ -464,7 +464,7 @@ the return codes and their meanings.) */ int -regcomp (regex_t *__restrict preg, const char *__restrict pattern, int cflags) +regcomp (regex_t *restrict preg, const char *restrict pattern, int cflags) { reg_errcode_t ret; reg_syntax_t syntax = ((cflags & REG_EXTENDED) ? RE_SYNTAX_POSIX_EXTENDED @@ -523,7 +523,7 @@ from either regcomp or regexec. We don't use PREG here. */ size_t -regerror (int errcode, const regex_t *__restrict preg, char *__restrict errbuf, +regerror (int errcode, const regex_t *restrict preg, char *restrict errbuf, size_t errbuf_size) { const char *msg; The compiler here was c99 in Oracle Studio 12.5 on Solaris 10 sparc with strict C99 compliance mode enforced. Dennis Clarke From unknown Tue Jun 17 01:33:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24323: "regcomp.c", line 467: error: syntax error before or at: preg Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-grep@gnu.org Resent-Date: Sun, 28 Aug 2016 08:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24323 X-GNU-PR-Package: grep X-GNU-PR-Keywords: To: Dennis Clarke , 24323@debbugs.gnu.org Received: via spool by 24323-submit@debbugs.gnu.org id=B24323.14723739638155 (code B ref 24323); Sun, 28 Aug 2016 08:47:02 +0000 Received: (at 24323) by debbugs.gnu.org; 28 Aug 2016 08:46:03 +0000 Received: from localhost ([127.0.0.1]:42466 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bdvj8-00027N-Un for submit@debbugs.gnu.org; Sun, 28 Aug 2016 04:46:03 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:49082) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bdvj3-00026p-Gj for 24323@debbugs.gnu.org; Sun, 28 Aug 2016 04:46:01 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 848DC161117; Sun, 28 Aug 2016 01:45:51 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 9G8gGs50HceI; Sun, 28 Aug 2016 01:45:50 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 1DABC161197; Sun, 28 Aug 2016 01:45:50 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id mLUL8k3j71s7; Sun, 28 Aug 2016 01:45:49 -0700 (PDT) Received: from [192.168.1.9] (unknown [100.32.155.148]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id C3949161117; Sun, 28 Aug 2016 01:45:49 -0700 (PDT) References: <16a98d34-c0b7-de96-5788-c105125742df@blastwave.org> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: <7f4f3eee-f2d4-31e5-c6bd-4c09e0f1f98b@cs.ucla.edu> Date: Sun, 28 Aug 2016 01:45:49 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <16a98d34-c0b7-de96-5788-c105125742df@blastwave.org> Content-Type: multipart/mixed; boundary="------------92A748AD7FB5142CAEA90D25" X-Spam-Score: -0.2 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.2 (/) This is a multi-part message in MIME format. --------------92A748AD7FB5142CAEA90D25 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Dennis Clarke wrote: > lib/regcomp.c will not compile with C99 strict compiler because of > the usage of the non-standard "__restrict". Thanks for the bug report. What are the diagnostics? > I compiled and tested 2.25 both with and without > the "restrict" and there was no measurable difference. POSIX requires a 'restrict' here; see=20 .= =20 (Whether a compiler takes advantage of 'restrict' is not something under = our=20 control....) > We may simply change "__restrict" to the C99 spec clean "restrict" or > remove it entirely with no worries. The Gnulib code is supposed to be portable to compilers that do not suppo= rt=20 'restrict'. It does this by #defining 'restrict' to something equivalent,= on=20 compilers that are picky about 'restrict' for one reason or another. Sun = C has=20 this problem (actually C++), so the code #defines 'restrict' to '__restri= ct' to=20 pacify it. Sun C supports __restrict, so I'm puzzled as to why you're observing a pr= oblem.=20 I did not have a problem building grep 2.25 on my Solaris 10 sparc host w= ith=20 Oracle Developer Studio 12.5. Please see the attached compressed build lo= g; you=20 might want to compare it with your build's output and debug any significa= nt=20 discrepancies (you can look in config.log). One more thing: why use 'c99'? On Solaris it's typically better to use 'c= c', as=20 'c99' is mainly for portability pedants. If 'grep' builds with 'cc' but n= ot with=20 'c99', I'm inclined to declare victory with Oracle Developer Studio. --------------92A748AD7FB5142CAEA90D25 Content-Type: application/gzip; name="build.txt.gz" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="build.txt.gz" H4sIAAAAAAACA+w9f2/cNrL/51MQQQEn12jXdpK+Xl5bwHWcwLj4B+K4l3sPD6pWonZ11pI6 UvJ679O/GZLSSlpSq+X2DsHDK4rYJjnkiBwOZ4Yzw+9InJC5oEVwOjl9++w7Ev/5zyT47Rn8 eEfuyirJODk5nbwldxUj5+Tt5OQN/npzF8oiEjE5PT75YXr8dvr6BGArFi0pCaJnqgV5yFbZ JJaTKs6jCU0qhD4mHymjIovDk7fHb46Pg9dviKzYm4ro/u7ur//6CsCDD5mgwemPx5/JHc8j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qiPZS17sY7HWmJqGGVHbMHJHyChzjTpiiI5M/SqQwWX1OGXIbAj8 vnV1xCgmuhTy/etcALYDql5MlgAA --------------92A748AD7FB5142CAEA90D25-- From unknown Tue Jun 17 01:33:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24323: "regcomp.c", line 467: error: syntax error before or at: preg Resent-From: Dennis Clarke Original-Sender: "Debbugs-submit" Resent-CC: bug-grep@gnu.org Resent-Date: Sun, 28 Aug 2016 16:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24323 X-GNU-PR-Package: grep X-GNU-PR-Keywords: To: Paul Eggert , 24323@debbugs.gnu.org Received: via spool by 24323-submit@debbugs.gnu.org id=B24323.147240214230765 (code B ref 24323); Sun, 28 Aug 2016 16:36:02 +0000 Received: (at 24323) by debbugs.gnu.org; 28 Aug 2016 16:35:42 +0000 Received: from localhost ([127.0.0.1]:42969 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1be33d-000809-TT for submit@debbugs.gnu.org; Sun, 28 Aug 2016 12:35:42 -0400 Received: from atl4mhob15.myregisteredsite.com ([209.17.115.53]:46040) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1be33a-0007zz-CY for 24323@debbugs.gnu.org; Sun, 28 Aug 2016 12:35:39 -0400 Received: from mailpod.hostingplatform.com ([10.30.77.36]) by atl4mhob15.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id u7SGZYHR011877 for <24323@debbugs.gnu.org>; Sun, 28 Aug 2016 12:35:34 -0400 Received: (qmail 20649 invoked by uid 0); 28 Aug 2016 16:35:34 -0000 X-TCPREMOTEIP: 99.247.223.96 X-Authenticated-UID: dclarke@blastwave.org Received: from unknown (HELO ?172.16.35.41?) (dclarke@blastwave.org@99.247.223.96) by 0 with ESMTPA; 28 Aug 2016 16:35:34 -0000 References: <16a98d34-c0b7-de96-5788-c105125742df@blastwave.org> <7f4f3eee-f2d4-31e5-c6bd-4c09e0f1f98b@cs.ucla.edu> From: Dennis Clarke Message-ID: <5b6aafc8-2fbb-f079-dbc2-ccb16fe673ee@blastwave.org> Date: Sun, 28 Aug 2016 12:34:27 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <7f4f3eee-f2d4-31e5-c6bd-4c09e0f1f98b@cs.ucla.edu> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 08/28/2016 04:45 AM, Paul Eggert wrote: > Dennis Clarke wrote: > >> lib/regcomp.c will not compile with C99 strict compiler because of >> the usage of the non-standard "__restrict". > > Thanks for the bug report. What are the diagnostics? I didn't get to see much other than this : CC regex.o "regcomp.c", line 467: error: syntax error before or at: preg "regcomp.c", line 467: warning: undefined or missing type for: preg "regcomp.c", line 467: warning: undefined or missing type for: const "regcomp.c", line 467: warning: undefined or missing type for: int "regcomp.c", line 467: warning: parameter mismatch: 3 declared, 0 defined "regcomp.c", line 470: error: undefined symbol: cflags "regcomp.c", line 473: error: undefined symbol: preg "regcomp.c", line 473: error: left operand of "->" must be pointer to struct/union "regcomp.c", line 474: error: left operand of "->" must be pointer to struct/union "regcomp.c", line 475: error: left operand of "->" must be pointer to struct/union "regcomp.c", line 478: error: left operand of "->" must be pointer to struct/union "regcomp.c", line 479: error: left operand of "->" must be pointer to struct/union "regcomp.c", line 490: error: non-unique member requires struct/union pointer: newline_anchor "regcomp.c", line 490: error: left operand of "->" must be pointer to struct/union "regcomp.c", line 493: error: non-unique member requires struct/union pointer: newline_anchor "regcomp.c", line 493: error: left operand of "->" must be pointer to struct/union "regcomp.c", line 494: error: left operand of "->" must be pointer to struct/union "regcomp.c", line 495: error: left operand of "->" must be pointer to struct/union "regcomp.c", line 497: error: undefined symbol: pattern "regcomp.c", line 497: warning: improper pointer/integer combination: arg #1 "regcomp.c", line 497: warning: improper pointer/integer combination: arg #1 "regcomp.c", line 497: warning: improper pointer/integer combination: arg #2 "regcomp.c", line 508: warning: improper pointer/integer combination: arg #1 "regcomp.c", line 512: error: left operand of "->" must be pointer to struct/union "regcomp.c", line 513: error: left operand of "->" must be pointer to struct/union "regcomp.c", line 526: error: syntax error before or at: preg "regcomp.c", line 526: warning: undefined or missing type for: preg "regcomp.c", line 526: warning: undefined or missing type for: char "regcomp.c", line 527: warning: undefined or missing type for: size_t "regcomp.c", line 526: warning: parameter mismatch: 4 declared, 0 defined "regcomp.c", line 545: error: undefined symbol: errbuf_size "regcomp.c", line 551: error: undefined symbol: errbuf "regcomp.c", line 551: error: cannot dereference non-pointer type "regcomp.c", line 553: error: undefined symbol: errbuf "regcomp.c", line 553: warning: improper pointer/integer combination: arg #1 c99: acomp failed for regex.c gmake[3]: *** [regex.o] Error 2 gmake[3]: Leaving directory `/usr/local/build/grep-2.25_SunOS5.10_sparcv9.001/lib' gmake[2]: *** [all] Error 2 gmake[2]: Leaving directory `/usr/local/build/grep-2.25_SunOS5.10_sparcv9.001/lib' gmake[1]: *** [all-recursive] Error 1 gmake[1]: Leaving directory `/usr/local/build/grep-2.25_SunOS5.10_sparcv9.001' gmake: *** [all] Error 2 >> I compiled and tested 2.25 both with and without >> the "restrict" and there was no measurable difference. > > POSIX requires a 'restrict' here; see > . (Whether > a compiler takes advantage of 'restrict' is not something under our > control....) Right .. yes. I went and found that *after* the first rebuild where I removed "__restrict" entirely and then put it back in as simply the standard "restrict". Which of course, works fine and everything tests just fine. > >> We may simply change "__restrict" to the C99 spec clean "restrict" or >> remove it entirely with no worries. > > The Gnulib code is supposed to be portable to compilers that do not > support 'restrict'. It does this by #defining 'restrict' to something > equivalent, on compilers that are picky about 'restrict' for one reason > or another. Sun C has this problem (actually C++), so the code #defines > 'restrict' to '__restrict' to pacify it. Guess that didn't work. However I didn't bother to go fishing to find if the '__restrict' was defined somewhere to be 'restrict'. I was looking for a quick fix and I felt a simple 'restrict' gets the job done nicely. > Sun C supports __restrict, so I'm puzzled as to why you're observing a > problem. dunno :-\ However I went and looked at the source and when I saw the not so spec standard double underscore there I simply muttered 'ah ha' and removed it entirely because it is just a programmers notice of intent. Then later there was some dust in the attic and I went and looked at regcomp(3C) which is right there smack dab in the manpages : Standard C Library Functions regcomp(3C) NAME regcomp, regexec, regerror, regfree - regular expression matching SYNOPSIS #include #include int regcomp(regex_t *restrict preg, const char *restrict pattern, int cflags); So I thought .. oops .. better put that 'restrict' back in. No usage of the double underscore however. Everything works great. > I did not have a problem building grep 2.25 on my Solaris 10 > sparc host with Oracle Developer Studio 12.5. Please see the attached > compressed build log; you might want to compare it with your build's > output and debug any significant discrepancies (you can look in > config.log). Well here comes the next interesting bit. This was one of my older machines and it has Oracle Studio 12.4 on it. That may be the oddball here but I doubt it. I will take a look at your logs however. Thank you for the comparison data. Normally I never get data to look at. > One more thing: why use 'c99'? On Solaris it's typically better to use > 'cc', as 'c99' is mainly for portability pedants. If 'grep' builds with > 'cc' but not with 'c99', I'm inclined to declare victory with Oracle > Developer Studio. I agree and yes I am a bit of a 'portability pedant' to be honest. For general purpose building of gnuified sources I give c99 a whirl first and see if the code compiles clean. If so .. be happy right? If not then take a look at see if there is something trivial. That was what happened here. If not trivial then change the CFLAGS and give up on ye old -Xc strict compliance mode and switch to cc with -Xa and a pile of other flags for my pedantic debugging mode needs : mimas$ echo $CFLAGS -m64 -xtarget=ultra2e -xarch=sparcvis -xchip=ultra2e -xcache=generic -errfmt=error -erroff=%none -errshort=full -xstrconst -xildoff -m64 -xmemalign=8s -xnolibmil -Xc -xcode=pic32 -xregs=no%appl -xlibmieee -mc -g -xs -ftrap=%none -Qy -xbuiltin=%none -xdebugformat=dwarf -xunroll=1 -D_TS_ERRNO -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE However portability is a real issue for me. Certainly with super critical tools like 'grep' or 'ls' etc. If the code were tightly constrained to C99 spec ISO/IEC 9899:TC3 with the use of strict posix functions then everything would work everywhere. Utopia. Not very likely to happen in this millenium. Dennis From unknown Tue Jun 17 01:33:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24323: "regcomp.c", line 467: error: syntax error before or at: preg Resent-From: Dennis Clarke Original-Sender: "Debbugs-submit" Resent-CC: bug-grep@gnu.org Resent-Date: Sun, 28 Aug 2016 16:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24323 X-GNU-PR-Package: grep X-GNU-PR-Keywords: To: Paul Eggert , 24323@debbugs.gnu.org Received: via spool by 24323-submit@debbugs.gnu.org id=B24323.147240348132727 (code B ref 24323); Sun, 28 Aug 2016 16:59:01 +0000 Received: (at 24323) by debbugs.gnu.org; 28 Aug 2016 16:58:01 +0000 Received: from localhost ([127.0.0.1]:42982 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1be3PF-0008Vi-6i for submit@debbugs.gnu.org; Sun, 28 Aug 2016 12:58:01 -0400 Received: from atl4mhob03.myregisteredsite.com ([209.17.115.41]:49192) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1be3PD-0008Vb-DG for 24323@debbugs.gnu.org; Sun, 28 Aug 2016 12:58:00 -0400 Received: from mailpod.hostingplatform.com ([10.30.77.36]) by atl4mhob03.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id u7SGvuFv029209 for <24323@debbugs.gnu.org>; Sun, 28 Aug 2016 12:57:56 -0400 Received: (qmail 27019 invoked by uid 0); 28 Aug 2016 16:57:56 -0000 X-TCPREMOTEIP: 99.247.223.96 X-Authenticated-UID: dclarke@blastwave.org Received: from unknown (HELO ?172.16.35.41?) (dclarke@blastwave.org@99.247.223.96) by 0 with ESMTPA; 28 Aug 2016 16:57:56 -0000 References: <16a98d34-c0b7-de96-5788-c105125742df@blastwave.org> <7f4f3eee-f2d4-31e5-c6bd-4c09e0f1f98b@cs.ucla.edu> From: Dennis Clarke Message-ID: Date: Sun, 28 Aug 2016 12:56:50 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <7f4f3eee-f2d4-31e5-c6bd-4c09e0f1f98b@cs.ucla.edu> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) > POSIX requires a 'restrict' here; see > . (Whether > a compiler takes advantage of 'restrict' is not something under our > control....) Maybe the first coffee has not hit yet but why is there a redefined "int regcomp" function inside lib/regcomp.c at all?? This is provided via the standard C lib and regex.h and so this really is not needed. I see in lib/regcomp.c : ( complete with the new page control char ) ^L /* Entry point for POSIX code. */ /* regcomp takes a regular expression as a string and compiles it. PREG is a regex_t *. We do not expect any fields to be initialized, since POSIX says we shouldn't. Thus, we set 'buffer' to the compiled pattern; 'used' to the length of the compiled pattern; 'syntax' to RE_SYNTAX_POSIX_EXTENDED if the REG_EXTENDED bit in CFLAGS is set; otherwise, to RE_SYNTAX_POSIX_BASIC; 'newline_anchor' to REG_NEWLINE being set in CFLAGS; 'fastmap' to an allocated space for the fastmap; 'fastmap_accurate' to zero; 're_nsub' to the number of subexpressions in PATTERN. PATTERN is the address of the pattern string. CFLAGS is a series of bits which affect compilation. If REG_EXTENDED is set, we use POSIX extended syntax; otherwise, we use POSIX basic syntax. If REG_NEWLINE is set, then . and [^...] don't match newline. Also, regexec will try a match beginning after every newline. If REG_ICASE is set, then we considers upper- and lowercase versions of letters to be equivalent when matching. If REG_NOSUB is set, then when PREG is passed to regexec, that routine will report only success or failure, and nothing about the registers. It returns 0 if it succeeds, nonzero if it doesn't. (See regex.h for the return codes and their meanings.) */ int regcomp (regex_t *restrict preg, const char *restrict pattern, int cflags) { . . . Not needed at all. I see in lib/regex.c this : #ifdef _LIBC /* We have to keep the namespace clean. */ . . . # define regcomp(preg, pattern, cflags) __regcomp (preg, pattern, cflags) . . . #include "regcomp.c" The only places that use "regcomp" are : ./lib/exclude.c ./lib/regex.c So really these can all use the standarc C library function provided and not use the thing in regexec.c at all. Hold on a sec here ... are we re-writing the POSIX standard C library functions for some reason ? Dennis From unknown Tue Jun 17 01:33:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24323: "regcomp.c", line 467: error: syntax error before or at: preg Resent-From: Dennis Clarke Original-Sender: "Debbugs-submit" Resent-CC: bug-grep@gnu.org Resent-Date: Sun, 28 Aug 2016 17:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24323 X-GNU-PR-Package: grep X-GNU-PR-Keywords: To: Paul Eggert , 24323@debbugs.gnu.org Received: via spool by 24323-submit@debbugs.gnu.org id=B24323.14724044571799 (code B ref 24323); Sun, 28 Aug 2016 17:15:02 +0000 Received: (at 24323) by debbugs.gnu.org; 28 Aug 2016 17:14:17 +0000 Received: from localhost ([127.0.0.1]:42989 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1be3ey-0000Sx-TF for submit@debbugs.gnu.org; Sun, 28 Aug 2016 13:14:17 -0400 Received: from atl4mhob08.myregisteredsite.com ([209.17.115.46]:52804) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1be3ex-0000Sp-2y for 24323@debbugs.gnu.org; Sun, 28 Aug 2016 13:14:15 -0400 Received: from mailpod.hostingplatform.com ([10.30.77.35]) by atl4mhob08.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id u7SHECXY029015 for <24323@debbugs.gnu.org>; Sun, 28 Aug 2016 13:14:12 -0400 Received: (qmail 26559 invoked by uid 0); 28 Aug 2016 17:14:11 -0000 X-TCPREMOTEIP: 99.247.223.96 X-Authenticated-UID: dclarke@blastwave.org Received: from unknown (HELO ?172.16.35.41?) (dclarke@blastwave.org@99.247.223.96) by 0 with ESMTPA; 28 Aug 2016 17:14:11 -0000 References: <16a98d34-c0b7-de96-5788-c105125742df@blastwave.org> <7f4f3eee-f2d4-31e5-c6bd-4c09e0f1f98b@cs.ucla.edu> From: Dennis Clarke Message-ID: <2f6493b8-d84a-1d78-f2c6-d129b907aaa8@blastwave.org> Date: Sun, 28 Aug 2016 13:13:05 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <7f4f3eee-f2d4-31e5-c6bd-4c09e0f1f98b@cs.ucla.edu> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 08/28/2016 04:45 AM, Paul Eggert wrote: > Dennis Clarke wrote: Coffee number two. Digging through the Changelog and looking at things like http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16911#24 I see the problems run deeper. This rabbit hole just goes on and on. I am happy with the change of '__restrict' to the standard 'restrict' which seems to be a no problem but the use of a special new regcomp function just doesn't seem to make sense when the libC already provides that. Dennis From unknown Tue Jun 17 01:33:07 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Dennis Clarke Subject: bug#24323: closed (Re: bug#24323: "regcomp.c", line 467: error: syntax error before or at: preg) Message-ID: References: <16a98d34-c0b7-de96-5788-c105125742df@blastwave.org> X-Gnu-PR-Message: they-closed 24323 X-Gnu-PR-Package: grep Reply-To: 24323@debbugs.gnu.org Date: Sun, 28 Aug 2016 19:59:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1472414342-16247-1" This is a multi-part message in MIME format... ------------=_1472414342-16247-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #24323: "regcomp.c", line 467: error: syntax error before or at: preg which was filed against the grep package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 24323@debbugs.gnu.org. --=20 24323: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D24323 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1472414342-16247-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 24323-done) by debbugs.gnu.org; 28 Aug 2016 19:58:53 +0000 Received: from localhost ([127.0.0.1]:43017 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1be6EH-0004De-0V for submit@debbugs.gnu.org; Sun, 28 Aug 2016 15:58:53 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:39086) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1be6EF-0004DS-3u for 24323-done@debbugs.gnu.org; Sun, 28 Aug 2016 15:58:51 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 2F8801601CD; Sun, 28 Aug 2016 12:58:45 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 2-C9IDsWpuy2; Sun, 28 Aug 2016 12:58:43 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id BDD6B160D1E; Sun, 28 Aug 2016 12:58:43 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id TM_YMBalhtBY; Sun, 28 Aug 2016 12:58:43 -0700 (PDT) Received: from [192.168.1.9] (unknown [100.32.155.148]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 9DDDE1601CD; Sun, 28 Aug 2016 12:58:43 -0700 (PDT) Subject: Re: bug#24323: "regcomp.c", line 467: error: syntax error before or at: preg To: Dennis Clarke , 24323-done@debbugs.gnu.org References: <16a98d34-c0b7-de96-5788-c105125742df@blastwave.org> <7f4f3eee-f2d4-31e5-c6bd-4c09e0f1f98b@cs.ucla.edu> <5b6aafc8-2fbb-f079-dbc2-ccb16fe673ee@blastwave.org> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: Date: Sun, 28 Aug 2016 12:58:39 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <5b6aafc8-2fbb-f079-dbc2-ccb16fe673ee@blastwave.org> Content-Type: multipart/mixed; boundary="------------49EE2EF000300CA2C877E6D6" X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: 24323-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.4 (-) This is a multi-part message in MIME format. --------------49EE2EF000300CA2C877E6D6 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable I see the problem: the grep 2.25 tarball contains a regression from Gnuli= b that=20 breaks compilation on some non-GCC compilers. Details below. Dennis Clarke wrote: > it has Oracle Studio 12.4 on it. Ah, that explains it. 12.4 c99 supports __restrict__ but not __restrict, = and=20 this runs afoul of a porting bug in grep 2.25, based on Gnulib commit=20 b7bc3c1a4e78add4cbad39ae1a0c4fb0747b483f (2016-04-09), which contains a=20 regression that causes regcomp.c to not build on (non-GCC) compilers that= lack=20 __restrict. After grep 2.25 came out, this regression was fixed in Gnulib= commit=20 334d97f35cef30af0cf61c5eeaa0a67890a45578 (2016-06-08), which you can see = here: http://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=3D334d97f35cef30af= 0cf61c5eeaa0a67890a45578 This Gnulib commit replaces __restrict with _Restrict_ in lib/regcomp.c, = which=20 fixes the regression. Applying this change to grep 2.25 should fix things= for you. I fixed the bug by installing the attached patch into the grep master bra= nch on=20 Savannah. This patch updates the Gnulib version to the current latest ver= sion,=20 which pulls in the abovementioned bug fix. > If not trivial then change the CFLAGS and give up on ye > old -Xc strict compliance mode and switch to cc with -Xa and a pile of > other flags for my pedantic debugging mode needs : > > mimas$ echo $CFLAGS > -m64 -xtarget=3Dultra2e -xarch=3Dsparcvis -xchip=3Dultra2e -xcache=3Dge= neric -errfmt=3Derror -erroff=3D%none -errshort=3Dfull -xstrconst -xildof= f -m64 -xmemalign=3D8s -xnolibmil -Xc -xcode=3Dpic32 -xregs=3Dno%appl -xl= ibmieee -mc -g -xs -ftrap=3D%none -Qy -xbuiltin=3D%none -xdebugformat=3Dd= warf -xunroll=3D1 -D_TS_ERRNO -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_S= OURCE You might want to look here for new compiler options in 12.5: https://docs.oracle.com/cd/E60778_01/html/E60742/gncki.html > Hold on a sec here ... are we re-writing the POSIX standard C library > functions for some reason ? Yes, as grep needs a regular expression matcher that works on data that c= an=20 contain NUL bytes ('\0') and encoding errors. The POSIX API does not prov= ide=20 this, so grep supplies a substitute regex matcher on systems like Solaris= that=20 lack the extensions to POSIX that grep needs. --------------49EE2EF000300CA2C877E6D6 Content-Type: text/x-diff; name="0001-build-update-gnulib-submodule-to-latest.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="0001-build-update-gnulib-submodule-to-latest.patch" =46rom 28bbd158919d5fabac2384a593b635f9054a8ba5 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 28 Aug 2016 10:52:18 -0700 Subject: [PATCH] build: update gnulib submodule to latest This should fix Bug#24323 reported by Dennis Clarke, where grep does not build on Solaris 10 when compiled with Solaris Studio 12.4. --- gnulib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnulib b/gnulib index b7bc3c1..bea6f3f 160000 --- a/gnulib +++ b/gnulib @@ -1 +1 @@ -Subproject commit b7bc3c1a4e78add4cbad39ae1a0c4fb0747b483f +Subproject commit bea6f3f8fc6ca3d5bc26e8fb651ecfcafa24115d --=20 2.7.4 --------------49EE2EF000300CA2C877E6D6-- ------------=_1472414342-16247-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 28 Aug 2016 03:42:17 +0000 Received: from localhost ([127.0.0.1]:42314 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bdqzA-0003FU-Of for submit@debbugs.gnu.org; Sat, 27 Aug 2016 23:42:16 -0400 Received: from eggs.gnu.org ([208.118.235.92]:59689) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bdqz8-0003FG-Sy for submit@debbugs.gnu.org; Sat, 27 Aug 2016 23:42:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bdqz2-0005lj-Mc for submit@debbugs.gnu.org; Sat, 27 Aug 2016 23:42:09 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:60491) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bdqz2-0005lf-JI for submit@debbugs.gnu.org; Sat, 27 Aug 2016 23:42:08 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50658) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bdqz0-0002rJ-Gd for bug-grep@gnu.org; Sat, 27 Aug 2016 23:42:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bdqyw-0005lC-8S for bug-grep@gnu.org; Sat, 27 Aug 2016 23:42:05 -0400 Received: from atl4mhob16.myregisteredsite.com ([209.17.115.109]:40096) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bdqyw-0005ko-3U for bug-grep@gnu.org; Sat, 27 Aug 2016 23:42:02 -0400 Received: from mailpod.hostingplatform.com ([10.30.77.35]) by atl4mhob16.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id u7S3fvk9022480 for ; Sat, 27 Aug 2016 23:41:57 -0400 Received: (qmail 16463 invoked by uid 0); 28 Aug 2016 03:41:57 -0000 X-TCPREMOTEIP: 99.247.223.96 X-Authenticated-UID: dclarke@blastwave.org Received: from unknown (HELO ?172.16.35.41?) (dclarke@blastwave.org@99.247.223.96) by 0 with ESMTPA; 28 Aug 2016 03:41:57 -0000 To: bug-grep@gnu.org From: Dennis Clarke Subject: "regcomp.c", line 467: error: syntax error before or at: preg Message-ID: <16a98d34-c0b7-de96-5788-c105125742df@blastwave.org> Date: Sat, 27 Aug 2016 23:40:45 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) lib/regcomp.c will not compile with C99 strict compiler because of the usage of the non-standard "__restrict". I question the use here of the "restrict" for the purpose of optimization so I compiled and tested 2.25 both with and without the "restrict" and there was no measurable difference. The testsuite passes fully regardless. We may simply change "__restrict" to the C99 spec clean "restrict" or remove it entirely with no worries. --- ./lib/regcomp.c_backup Sun Apr 10 16:50:01 2016 +++ ./lib/regcomp.c Sun Aug 28 02:35:43 2016 @@ -464,7 +464,7 @@ the return codes and their meanings.) */ int -regcomp (regex_t *__restrict preg, const char *__restrict pattern, int cflags) +regcomp (regex_t *restrict preg, const char *restrict pattern, int cflags) { reg_errcode_t ret; reg_syntax_t syntax = ((cflags & REG_EXTENDED) ? RE_SYNTAX_POSIX_EXTENDED @@ -523,7 +523,7 @@ from either regcomp or regexec. We don't use PREG here. */ size_t -regerror (int errcode, const regex_t *__restrict preg, char *__restrict errbuf, +regerror (int errcode, const regex_t *restrict preg, char *restrict errbuf, size_t errbuf_size) { const char *msg; The compiler here was c99 in Oracle Studio 12.5 on Solaris 10 sparc with strict C99 compliance mode enforced. Dennis Clarke ------------=_1472414342-16247-1-- From unknown Tue Jun 17 01:33:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24323: "regcomp.c", line 467: error: syntax error before or at: preg Resent-From: Dennis Clarke Original-Sender: "Debbugs-submit" Resent-CC: bug-grep@gnu.org Resent-Date: Sun, 28 Aug 2016 21:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24323 X-GNU-PR-Package: grep X-GNU-PR-Keywords: To: Paul Eggert , 24323-done@debbugs.gnu.org Received: via spool by 24323-done@debbugs.gnu.org id=D24323.147241871323010 (code D ref 24323); Sun, 28 Aug 2016 21:12:01 +0000 Received: (at 24323-done) by debbugs.gnu.org; 28 Aug 2016 21:11:53 +0000 Received: from localhost ([127.0.0.1]:43113 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1be7Mv-0005z4-85 for submit@debbugs.gnu.org; Sun, 28 Aug 2016 17:11:53 -0400 Received: from atl4mhob16.myregisteredsite.com ([209.17.115.109]:35478) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1be7Mt-0005yw-0Z for 24323-done@debbugs.gnu.org; Sun, 28 Aug 2016 17:11:51 -0400 Received: from mailpod.hostingplatform.com ([10.30.77.36]) by atl4mhob16.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id u7SLBmNU035726 for <24323-done@debbugs.gnu.org>; Sun, 28 Aug 2016 17:11:48 -0400 Received: (qmail 3644 invoked by uid 0); 28 Aug 2016 21:11:48 -0000 X-TCPREMOTEIP: 99.247.223.96 X-Authenticated-UID: dclarke@blastwave.org Received: from unknown (HELO ?172.16.35.41?) (dclarke@blastwave.org@99.247.223.96) by 0 with ESMTPA; 28 Aug 2016 21:11:48 -0000 References: <16a98d34-c0b7-de96-5788-c105125742df@blastwave.org> <7f4f3eee-f2d4-31e5-c6bd-4c09e0f1f98b@cs.ucla.edu> <5b6aafc8-2fbb-f079-dbc2-ccb16fe673ee@blastwave.org> From: Dennis Clarke Message-ID: <611d87e2-3ab2-98ef-c840-3ca43472cb91@blastwave.org> Date: Sun, 28 Aug 2016 17:10:41 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 08/28/2016 03:58 PM, Paul Eggert wrote: > I see the problem ... > Ah, that explains it. 12.4 c99 supports __restrict__ but not __restrict, Sort of what I said .. I think. For that matter are you sure about the use of "__restrict__" ? > This Gnulib commit replaces __restrict with _Restrict_ I saw that in a few places and wondered if there was a mistake. I don't think that __Restrict__ exists in any standard anywhere either. > I fixed the bug by installing the attached patch into the grep master > branch on Savannah. This patch updates the Gnulib version to the current > latest version, which pulls in the abovementioned bug fix. I will have to wait for a release to use that. For now I just toss out the __restrict and use proper "restrict" and everything is fine. > You might want to look here for new compiler options in 12.5: > > https://docs.oracle.com/cd/E60778_01/html/E60742/gncki.html Yep. A lot of build scripts will have to be looked at. Eventually. >> Hold on a sec here ... are we re-writing the POSIX standard C library >> functions for some reason ? > > Yes, as grep needs a regular expression matcher that works on data that > can contain NUL bytes ('\0') and encoding errors. Well this explains why I generally install GNU grep and use it as opposed to /usr/xpg4/bin/grep on Solaris machines. However the pedantic scripts still use the XPG4 version. Mostly because we know it will always exist. > The POSIX API does not > provide this, so grep supplies a substitute regex matcher on systems > like Solaris that lack the extensions to POSIX that grep needs. yep .. Solaris systems can be very spec tight and this is why I often compile things with c99 just to shake loose these little bugs which would otherwise fly under radar. Thank you for the quick bug fix. Dennis From unknown Tue Jun 17 01:33:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24323: "regcomp.c", line 467: error: syntax error before or at: preg Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-grep@gnu.org Resent-Date: Mon, 29 Aug 2016 00:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24323 X-GNU-PR-Package: grep X-GNU-PR-Keywords: To: Dennis Clarke , 24323-done@debbugs.gnu.org Received: via spool by 24323-done@debbugs.gnu.org id=D24323.14724287415856 (code D ref 24323); Mon, 29 Aug 2016 00:00:02 +0000 Received: (at 24323-done) by debbugs.gnu.org; 28 Aug 2016 23:59:01 +0000 Received: from localhost ([127.0.0.1]:43171 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1be9yf-0001WJ-A7 for submit@debbugs.gnu.org; Sun, 28 Aug 2016 19:59:01 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:45947) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1be9ye-0001W4-9A for 24323-done@debbugs.gnu.org; Sun, 28 Aug 2016 19:59:00 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id D97D9160095; Sun, 28 Aug 2016 16:58:54 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id RGI97087pr7X; Sun, 28 Aug 2016 16:58:54 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 2181716066C; Sun, 28 Aug 2016 16:58:54 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id h-Ybq2MAQWRC; Sun, 28 Aug 2016 16:58:54 -0700 (PDT) Received: from [192.168.1.9] (unknown [100.32.155.148]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 00449160095; Sun, 28 Aug 2016 16:58:53 -0700 (PDT) References: <16a98d34-c0b7-de96-5788-c105125742df@blastwave.org> <7f4f3eee-f2d4-31e5-c6bd-4c09e0f1f98b@cs.ucla.edu> <5b6aafc8-2fbb-f079-dbc2-ccb16fe673ee@blastwave.org> <611d87e2-3ab2-98ef-c840-3ca43472cb91@blastwave.org> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: <296b41b8-8b1d-48a2-b9f8-f65159a6e77b@cs.ucla.edu> Date: Sun, 28 Aug 2016 16:58:53 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <611d87e2-3ab2-98ef-c840-3ca43472cb91@blastwave.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -1.4 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.4 (-) Dennis Clarke wrote: > On 08/28/2016 03:58 PM, Paul Eggert wrote: >> I see the problem ... > >> Ah, that explains it. 12.4 c99 supports __restrict__ but not __restrict, > > Sort of what I said .. I think. For that matter are you sure about the > use of "__restrict__" ? Your original bug report said 12.5, which caused me to waste some time installing 12.5 and finding no bug. Yes, I observed the behavior with __restrict__ and __restrict. >> This Gnulib commit replaces __restrict with _Restrict_ > > I saw that in a few places and wondered if there was a mistake. I don't > think that __Restrict__ exists in any standard anywhere either. It doesn't. _Restrict_ is a macro defined by Gnulib, which should expand to the appropriate keyword (or non-keyword). > I will have to wait for a release to use that. For now I just toss out > the __restrict and use proper "restrict" and everything is fine. Yes, that should work. From unknown Tue Jun 17 01:33:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24323: "regcomp.c", line 467: error: syntax error before or at: preg Resent-From: Dennis Clarke Original-Sender: "Debbugs-submit" Resent-CC: bug-grep@gnu.org Resent-Date: Mon, 29 Aug 2016 01:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24323 X-GNU-PR-Package: grep X-GNU-PR-Keywords: To: Paul Eggert , 24323-done@debbugs.gnu.org Received: via spool by 24323-done@debbugs.gnu.org id=D24323.147243476015458 (code D ref 24323); Mon, 29 Aug 2016 01:40:01 +0000 Received: (at 24323-done) by debbugs.gnu.org; 29 Aug 2016 01:39:20 +0000 Received: from localhost ([127.0.0.1]:43203 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1beBXk-00041G-L3 for submit@debbugs.gnu.org; Sun, 28 Aug 2016 21:39:20 -0400 Received: from atl4mhob09.myregisteredsite.com ([209.17.115.47]:41690) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1beBXi-000418-W7 for 24323-done@debbugs.gnu.org; Sun, 28 Aug 2016 21:39:19 -0400 Received: from mailpod.hostingplatform.com ([10.30.77.35]) by atl4mhob09.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id u7T1dGXa029972 for <24323-done@debbugs.gnu.org>; Sun, 28 Aug 2016 21:39:16 -0400 Received: (qmail 5454 invoked by uid 0); 29 Aug 2016 01:39:16 -0000 X-TCPREMOTEIP: 99.247.223.96 X-Authenticated-UID: dclarke@blastwave.org Received: from unknown (HELO ?172.16.35.41?) (dclarke@blastwave.org@99.247.223.96) by 0 with ESMTPA; 29 Aug 2016 01:39:16 -0000 References: <16a98d34-c0b7-de96-5788-c105125742df@blastwave.org> <7f4f3eee-f2d4-31e5-c6bd-4c09e0f1f98b@cs.ucla.edu> <5b6aafc8-2fbb-f079-dbc2-ccb16fe673ee@blastwave.org> <611d87e2-3ab2-98ef-c840-3ca43472cb91@blastwave.org> <296b41b8-8b1d-48a2-b9f8-f65159a6e77b@cs.ucla.edu> From: Dennis Clarke Message-ID: <7a723ad9-6c6d-05b1-6aa3-0030bc8ae0bd@blastwave.org> Date: Sun, 28 Aug 2016 21:38:10 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <296b41b8-8b1d-48a2-b9f8-f65159a6e77b@cs.ucla.edu> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 08/28/2016 07:58 PM, Paul Eggert wrote: > Dennis Clarke wrote: >> On 08/28/2016 03:58 PM, Paul Eggert wrote: >>> I see the problem ... >> >>> Ah, that explains it. 12.4 c99 supports __restrict__ but not __restrict, >> >> Sort of what I said .. I think. For that matter are you sure about the >> use of "__restrict__" ? > > Your original bug report said 12.5, which caused me to waste some time > installing 12.5 and finding no bug. Sorry. Wrong machine. I have a pile of different revs here and the system which tossed the error was in actual fact Oracle Studio 12.4 whereas nearly any other Solaris 10 or 11 machine has Studio 12.5 on them. > > Yes, I observed the behavior with __restrict__ and __restrict. > >>> This Gnulib commit replaces __restrict with _Restrict_ >> >> I saw that in a few places and wondered if there was a mistake. I don't >> think that __Restrict__ exists in any standard anywhere either. > > It doesn't. _Restrict_ is a macro defined by Gnulib, which should expand > to the appropriate keyword (or non-keyword). > >> I will have to wait for a release to use that. For now I just toss out >> the __restrict and use proper "restrict" and everything is fine. > > Yes, that should work. I think the testsuite is a valid test and everything passes fine so it looks fine as just "restrict". Dennis