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=0.7 required=5.0 tests=BAYES_00,DATE_IN_PAST_03_06, FORGED_GMAIL_RCVD,FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,62673a6f294b6ea4,start X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.204.154.133 with SMTP id o5mr406966bkw.0.1339693980714; Thu, 14 Jun 2012 10:13:00 -0700 (PDT) Path: e27ni48004bkw.0!nntp.google.com!news1.google.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: Ben Hocking Newsgroups: comp.lang.ada Subject: Having problem with SPARK Ada complaining that 'No EXPRESSION can start with reserved word "OTHERS".' Date: Thu, 14 Jun 2012 05:43:42 -0700 (PDT) Organization: http://groups.google.com Message-ID: NNTP-Posting-Host: 8.25.3.17 Mime-Version: 1.0 X-Trace: posting.google.com 1339678728 14791 127.0.0.1 (14 Jun 2012 12:58:48 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 14 Jun 2012 12:58:48 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=8.25.3.17; posting-account=hKGsDAoAAAC9HB_9misjykjawYQeT_yf User-Agent: G2/1.0 Content-Type: text/plain; charset=ISO-8859-1 Date: 2012-06-14T05:43:42-07:00 List-Id: The following is a simple test program to demonstrate the issue. test.ads: ==== package Test is type QState is (Off, On, Both); subtype Z4 is Integer range 0 .. 3; -- 0, 1, 2, or 3 type Ensemble is array (Z4) of QState; procedure Foo; end Test; ==== test.adb: ==== package body Test is procedure Foo is SomeQState : Ensemble := (others => Off); begin null; end Foo; end Test; ==== When I use SPARK->Examine File (from GPS), I get the following message: 4:33 Syntax Error No EXPRESSION can start with reserved word "OTHERS". I get the same error if I type "spark test.adb" from the terminal window (I'm on Mac OS X 10.6.8). I know this is valid Ada, because this compiles without issue: gcc -c -g -gnatQ -gnato -fstack-check -g test.adb I've tried this with both SPARK95 and SPARK2005. I'm using the AdaCore tool chain. The version information for SPARK is: $ spark -version ******************************************************* Examiner GPL 2011 Copyright (C) 2011 Altran Praxis Limited, Bath, U.K. ******************************************************* Any help would be appreciated!