Apparent gpc bug_(re)

Fri, 14 Mar 1997 21:39:22 +0100 (MET)


According to Stephen Lindholm:
> gpc barfs on this program.[...]
>
> [...]
>
> type
>  TLittleChar = 'A' .. 'C';

Ah - I see.  Okay, it's easy to fix:  In gpc-parse.y do the following:

8< ----------------------------------------------------------------------------

gpc-parse.y gpc/gpc-parse.y
--- gpc-970226/gpc-parse.y	Thu Feb 27 11:34:07 1997
+++ gpc/gpc-parse.y	Wed Mar 12 19:36:39 1997
@@ -1568,6 +1568,8 @@
 subrange_type :
 	  constant TWODOTS expression
 		{
+		  $1 = string_may_be_char ($1);
+		  $3 = string_may_be_char ($3);
 		  if (PEDANTIC (E_O_PASCAL)
 		      && (! TREE_CONSTANT ($3) || ! TREE_CONSTANT ($1)))
 		    pedwarn ("ISO 7185 Pascal does not allow non-constant range bounds");

8< ----------------------------------------------------------------------------

The bug will be corrected in the next alpha release, too.
Thanks for the report!

Yours,

    Peter

  Dipl.-Phys. Peter Gerwinski, Essen, Germany, free physicist and programmer
peter.gerwinski@uni-essen.de - http://home.pages.de/~peter.gerwinski/ [970201]
       maintainer GNU Pascal - http://home.pages.de/~gnu-pascal/ [970125]


Peter Gerwinski (peter@agnes.dida.physik.uni-essen.de)

HTML conversion by Lluís de Yzaguirre i Maura
Institut de Lingüística Aplicada - Universitat "Pompeu Fabra"
e-mail: de_yza@upf.es