Frank Heckenbach wrote:
I have uploaded a new beta version of GPC to http://www.g-n-u.de/gpc/!
Thanks for the new version !
I would be curious to know the status of:
- Waldek's gcc-3.4.x and qualified identifier patches - range checking
Building on Mac OS X with gcc-3.3.5 worked. I used the gcc-3.3.3 diff and found two hunks that don't apply::
1. gcc/expr.c: rtx datum = gen_int_mode (word, mode); This is already fixed in gcc-3.3.5, see http://gcc.gnu.org/ml/gcc-patches/2004-03/msg02060.html
2. gcc/emit-rtl.c
if (alias == 0 && expr == 0 && offset == 0 && (size == 0 || (mode != BLKmode && GET_MODE_SIZE (mode) == INTVAL (size))) + #ifndef GPC && (align == BITS_PER_UNIT || (STRICT_ALIGNMENT && mode != BLKmode && align == GET_MODE_ALIGNMENT (mode)))) + #else + && (align == MEM_ALIGN0 (mode))) + #endif return 0;
In gcc-3.3.5, the code has changed, but I don't know if that makes a patch unnecessary.
if (alias == 0 && expr == 0 && offset == 0 && (size == 0 || (mode != BLKmode && GET_MODE_SIZE (mode) == INTVAL (size))) && (STRICT_ALIGNMENT && mode != BLKmode ? align == GET_MODE_ALIGNMENT (mode) : align == BITS_PER_UNIT)) return 0;
Running the testsuite on Mac OS X didn't reveal unexpected problems.
Another major improvement is in the area of initializers, thanks to Waldek Hebisch. GPC now allows initialization of variant records (fjf259.pas, peter6.pas) and packed arrays (emil5.pas) and supports Extended Pascal's structured initializers (fjf964*.pas, fjf967*.pas, fjf968*.pas) as well as record, array and set values (constdef.pas, fjf966*.pas, fjf971*.pas).
Unfortunately, we don't have very many test programs for these new features yet. If you can send us some (according to the guidelines described in the manual), this will be very welcome.
I found a problem with initializers:
PROGRAM FP;
FUNCTION F1: Pointer; BEGIN F1:= NIL END;
FUNCTION F2( I: INTEGER): Pointer; BEGIN F2:= NIL END;
VAR P1 : Pointer value @F1; {error - initializer element for `P1' is not constant} P2 : Pointer value @F2; {OK}
BEGIN END.
Regards,
Adriaan van Os