regex.c value out of range on Solaris compiler

2017-04-14 Thread Gavin Smith
Hello, When I try to compile a program using the 'regex' module on Solaris 10, I get the output /opt/solarisstudio12.3/bin/c99 -Xc -D_XPG6 -DHAVE_CONFIG_H -I. -I../.. -D_REENTRANT -I/opt/csw/include -c -o regex.o regex.c "regex_internal.h", line 105: warning: macro redefined: gettext "regex_

Re: regex.c value out of range on Solaris compiler

2017-04-14 Thread Gavin Smith
On Fri, Apr 14, 2017 at 10:27:45PM +0100, Gavin Smith wrote: > Line 21273 is > subl$4294967296,%eax > > Line 21294 is > subl$4294967296,%eax > > > the problem occurs. I believe that the faulty code is coming from the > use of INT_ADD_WRAPV from intprops.h. I haven't inve

Re: regex.c value out of range on Solaris compiler

2017-04-14 Thread Paul Eggert
Thanks for reporting the problem. On 04/14/2017 02:27 PM, Gavin Smith wrote: > /opt/solarisstudio12.3/bin/c99 -Xc -D_XPG6 -DHAVE_CONFIG_H -I. -I../.. > -D_REENTRANT -I/opt/csw/include -c -o regex.o regex.c > "regex_internal.h", line 105: warning: macro redefined: gettext That's odd. Where was t

Re: regex.c value out of range on Solaris compiler

2017-04-15 Thread Gavin Smith
On Fri, Apr 14, 2017 at 07:00:06PM -0700, Paul Eggert wrote: > On 04/14/2017 02:27 PM, Gavin Smith wrote: > > /opt/solarisstudio12.3/bin/c99 -Xc -D_XPG6 -DHAVE_CONFIG_H -I. -I../.. > > -D_REENTRANT -I/opt/csw/include -c -o regex.o regex.c > > "regex_internal.h", line 105: warning: macro redefined:

Re: regex.c value out of range on Solaris compiler

2017-04-15 Thread Paul Eggert
Gavin Smith wrote: On Fri, Apr 14, 2017 at 07:00:06PM -0700, Paul Eggert wrote: On 04/14/2017 02:27 PM, Gavin Smith wrote: /opt/solarisstudio12.3/bin/c99 -Xc -D_XPG6 -DHAVE_CONFIG_H -I. -I../.. -D_REENTRANT -I/opt/csw/include -c -o regex.o regex.c "regex_internal.h", line 105: warning: macro r

Re: regex.c value out of range on Solaris compiler

2017-04-16 Thread Gavin Smith
On Sat, Apr 15, 2017 at 02:40:49PM -0700, Paul Eggert wrote: > Sorry, I don't understand how this could be. regex_internal.h's "#define > gettext(msgid) msgid" line is in the else-part of the #if that #includes > libintl.h in its then-part, so how can libintl.h's #define for gettext be > active whe

Re: regex.c value out of range on Solaris compiler

2017-04-16 Thread Paul Eggert
Thanks for the explanation; I installed the attached further patch. >From 6ff8421cf8709b1c210b6a15118d3baa2d6685a8 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 16 Apr 2017 12:43:20 -0700 Subject: [PATCH] regex: port better to Solaris 10 Solaris 10 includes , which #defines gettext, and