From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,e0fa6eae2c537e3d X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Tue, 22 Mar 2011 20:01:18 +0100 From: Georg Bauhaus User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: GNAT.Regpat problem. References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <4d88f1fe$0$6981$9b4e6d93@newsspool4.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 22 Mar 2011 20:01:19 CET NNTP-Posting-Host: 6f40e9e5.newsspool4.arcor-online.net X-Trace: DXC=9JT4ZY8dl6m<6cDJZfMd_c4IUK5GmnPCY\c7>ejVhQf;D0OPJ8kiV`4Mm1fYX4b X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:19351 Date: 2011-03-22T20:01:19+01:00 List-Id: On 3/22/11 7:35 PM, Peter C. Chapin wrote: > with Ada.Text_IO; use Ada.Text_IO; > with GNAT.Regpat; > > procedure Check is > Matcher : GNAT.Regpat.Pattern_Matcher(10); > > begin > GNAT.Regpat.Compile(Matcher, "^[:space:]*xyzzy$"); > > exception > when Storage_Error => > Put_Line("Insufficient space in Pattern_Matcher"); > > end Check; Does -fstack-check (-fno-stack-check) have an effect? FWIW, I get $ ./check raised SYSTEM.REGPAT.EXPRESSION_ERROR : Pattern_Matcher is too small with GNAT GPL 2010 on Mac OS X. This agrees with the source of Compile in s-regpat.adb, which has if Size > Matcher.Size then raise Expression_Error with "Pattern_Matcher is too small"; end if; Looks like a documentation bug in any case.