GNU Pascal Homepage - gpc - gpc-announce - gpc-de - gpc-doc
Diese Seite auf deutsch

Mail #11463

Back to main page of archive

Previous mail   Next mail   Unformatted/full headers
Overview  10 days   Subject   Date   Thread   Author  

From: Emil Jerabek
Subject: GPC ALPHA 20050217 released
Date: 18 Feb 2005, 14:34:30

On Thu, Feb 17, 2005 at 05:27:30AM +0100, Frank Heckenbach wrote:
[...]
> - Initialized types in record and object fields and in schemata work
>   now. (inirec[24].pas, fjf1016*.pas)
> 

The following schema definition does not compile.

[~/pas]% cat tstsch.pas
program Test (output);

type
        colour = (red, yellow, green, blue);
        { from ISO 10206, 6.4.10 }
        colour_map (formal_discriminant: colour) =
                record
                case formal_discriminant of
                  red:    (red_field:    integer value ord (red));
                  yellow: (yellow_field: integer value ord (yellow));
                  green:  (green_field:  integer value ord (green));
                  blue:   (blue_field:   integer value ord (blue));
                end;
        cmap_blue = colour_map (blue);

const
        cb = cmap_blue [case blue of [blue_field: 42]];

var
        cg: colour_map (green);

begin
  if (cb.blue_field = 42) and (cg.green_field = 2) then writeln ('OK')
  else writeln ('failed')
end.
[~/pas]% gpc34 -v
Reading specs from /usr/local/lib/gcc/i686-pc-linux-gnu/3.4.3/specs
Configured with: ../gcc-3.4.3/configure --enable-languages=pascal --program-suffix=34
Thread model: posix
gpc version 20050217, based on gcc-3.4.3
[~/pas]% gpc34 tstsch.pas
tstsch.pas:13: error: undeclared identifier `red_field' (first use in this routine)
tstsch.pas:13: error:  (Each undeclared identifier is reported only once
tstsch.pas:13: error:  for each routine it appears in.)
tstsch.pas:13: error: undeclared identifier `yellow_field' (first use in this routine)
tstsch.pas:13: error: undeclared identifier `green_field' (first use in this routine)
tstsch.pas:13: error: undeclared identifier `blue_field' (first use in this routine)


And another bug:

[~/pas]% cat test.p
program foo;

type
  t = array [0..32765] of integer;

var
  m: ^t;

begin
  new (m)
end.
[~/pas]% gpc34 test.p
[~/pas]% ./a.out
./a.out: value out of range (error #300 at 804ef2a)


Emil

Previous mail   Next mail   Unformatted/full headers
Overview  10 days   Subject   Date   Thread   Author  


Replies

Author Subject Date
Frank Heckenbach GPC ALPHA 20050217 released 24 Feb 2005, 03:00:52
Adriaan van Os GPC ALPHA 20050217 released 24 Feb 2005, 10:49:43
Frank Heckenbach GPC ALPHA 20050217 released 1 Mar 2005, 03:02:08
Rick Engebretson GPC ALPHA 20050217 released 1 Mar 2005, 01:19:33
Frank Heckenbach GPC ALPHA 20050217 released 1 Mar 2005, 16:52:49
Rick Engebretson GPC ALPHA 20050217 released 1 Mar 2005, 10:42:31
Rick Engebretson GPC ALPHA 20050217 released 1 Mar 2005, 11:04:16

In reply to

Author Subject Date
Frank Heckenbach GPC ALPHA 20050217 released 17 Feb 2005, 05:27:30

Back to main page of archive


Note: This page contains information that does not originate from the owner of this web site, but from the authors of the mails archived. The owner of this web site is not responsible for the content of such information. Any use of that infomation requires the consent of the respective author.

Where WWW addresses (URLs) in the mails archived are marked as hyperlinks, this is only for the comfort of the reader. The content of the web pages linked to like this does not necessarily reflect the opinion of the owner of this web site or of the authors of the mails archived. The owner of this web site is not responsible for the content of such web pages. Those pages are explicitly not to be considered as part of the content of this page, but merely as references.


This page was created by Crystal 0.999 (Linux 2.4.27/i686).