GNU Pascal Homepage - gpc - gpc-announce - gpc-de - gpc-doc
This page in English

Mail #3019

Zurück zur Archiv-Hauptseite

Vorige Mail   Nächste Mail   Unformatiert/Volle Header
Übersicht  10 Tage   Betreff   Datum   Thread   Autor  

Von: Tom Schneider
Betreff: bug in gpc, map[b].b
Datum: 26.8.1999, 22:07:47

Hi - 

We just got the latest version of gpc:

GNU Pascal version 19990118, based on gcc-2.8.1, compiled Aug 25 1999 09:07:02.

and it is objecting to a line of code in one of my programs:

ftp://ftp.ncifcrf.gov/pub/delila/makelogo.p

I am compiling with:

gpc makelogo.p -o makelogo

The message I get is:

makelogo.p: In function `Themain':
makelogo.p:4093: cannot take address of bitfield `B'

Line 4093 is: 
            readln(symvec,map[b].b, map[b].n); 

b is defined as:

   b: integer; (* index to a symbol *)

map is defined as:

   position = 0..mapmax;
   place = packed record
      b: char; (* the symbol *)
      n: integer (* the number of symbols *)
   end;

so is it getting confused about the "two" uses of b?

I changed b to 'bloop' and made a new variable,
but the other b was still around and it still yelled:

makelogo.p: In function `Themain':
makelogo.p:4094: cannot take address of bitfield `B'
 
I even changed the definition so that:

            readln(symvec,map[bloop].bsymbol, map[bloop].n);

but *STILL* got:

makelogo.p: In function `Themain':
makelogo.p:4094: cannot take address of bitfield `Bsymbol'

since map is used in other places, there seems to be a bug in the
use here in the middle of a readln.

So I defined

   c: char;

and separated it;

            readln(symvec,c, map[bloop].n);
            map[bloop].bsymbol := c;

and now it compiles.

This program compiles just fine with the Sun compiler and translates
into C with p2c and compiles with gcc.

Regards,

Tom

  Dr. Thomas D. Schneider
  National Cancer Institute
  Laboratory of Experimental and Computational Biology
  Frederick, Maryland  21702-1201
  toms@ncifcrf.gov
  permanent email: toms@alum.mit.edu
  http://www.lecb.ncifcrf.gov/~toms/

Vorige Mail   Nächste Mail   Unformatiert/Volle Header
Übersicht  10 Tage   Betreff   Datum   Thread   Autor  


Antworten auf diese Mail

Autor Betreff Datum
Peter Gerwinski bug in gpc, map[b].b 30.8.1999, 16:19:27

Zurück zur Archiv-Hauptseite


Hinweis: Diese Seite enthält Informationen, die nicht vom Betreiber dieser Website, sondern von den Autoren der archivierten Mails stammen. Der Betreiber dieser Website ist nicht für den Inhalt dieser Informationen verantwortlich. Die weitere Verwendung dieser Informationen bedarf des Einverständnisses des jeweiligen Autors.

Sofern WWW-Adressen (URLs) in den archivierten Mails als Hyperlinks hervorgehoben werden, so geschieht dies ausschließlich zur Annehmlichkeit für den Leser. Der Inhalt der auf diese Weise angelinkten Webseiten spiegelt nicht notwendigerweise die Meinung des Betreibers dieser Webseite oder der Autoren der archivierten Mails wider. Der Betreiber dieser Webseite ist nicht für den Inhalt solcher Webseiten verantwortlich. Diese Seiten sind ausdrücklich nicht als Teil des Inhalts dieser Seite zu betrachten, sondern lediglich als Referenzen.


Diese Seite wurde erzeugt von Crystal 0.999 (Linux 2.4.27/i686).