It looks like the "20050325: check identifier scopes stricter" bug fix didn't completely solve all the identifier redeclaration error problems involving an applied occurance of an outer scope identifier in an inner scope with a defining occurance of the identifier. The following two test programs will compile and run with the latest GPC version which shows that GPC still has a few problems with detecting redeclaration errors in scopes involving record type-denoter and formal-parameter-list regions. {$extended-pascal} program gale7 (output); type t = record case integer of 0: (boolean : boolean) {WRONG} otherwise (f : integer) end; begin writeln('FAIL'); end. {$extended-pascal} program gale8 (output); type t = integer; procedure foo(t: t); {WRONG} begin end; begin writeln('FAIL'); end. The compiler I used was the latest version of Mac OS X GPC that Adriaan built and made available for downloading few weeks ago. The specs: Reading specs from /Developer/Pascal/gpc345u2/lib/gcc/powerpc-apple-darwin8/3.4.5/specs Configured with: ../gcc-3.4.5/configure --enable-languages=pascal,c --enable-threads=posix --target=powerpc-apple-darwin8 --host=powerpc-apple-darwin8 --build=powerpc-apple-darwin8 --prefix=/Developer/Pascal/gpc345u2 Thread model: posix gpc version 20051116, based on gcc-3.4.5 Gale Paeper gpaeper@empirenet.com
participants (1)
-
Gale Paeper