I have uploaded a new beta version of GPC to http://www.g-n-u.de/gpc/!
Because our main server is still out of order, please note:
- The new URL, as stated above. www.gnu-pascal.de still doesn't work.
- There are just the "bare bones" files (full and minimal source distribution, binaries for Linux/IA32 with and without gcc). No diffs, no separate test files, no HTML pages etc.
- The main directory in the full source distribution is probably different! Be careful with automatic build scripts.
- The releases are signed with a new OpenPGP key. The fingerprint is given in my signature in this mail and my other mails to the gpc@gnu.de list for some weeks.
When the main server is back again, I'll do the usual release procedures there.
One major change is that the types `Integer', `Word', `Cardinal' are now equivalent to `PtrInt', `PtrWord', `PtrCard', no more (necessarily) to C's `int' and `unsigned int' types. New types `CInteger', `CWord', `CCardinal' are provided for the latter purpose.
This affects C interfaces in particular. A "porting guide" is given below. If you maintain any such interfaces, be sure to read it carefully.
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.
Other new features:
* `Discard'
* new make variable `GPC_PAGESIZE' to set the page size when building the manual (PDF, PostScript, DVI)
* `qualified' and import lists are no more allowed after `uses' (only after `import', as EP demands) (@)
* the `GMP' unit doesn't support gmp-2.x anymore (if you used it, just upgrade to a newer GMP version) (@)
* conflicts between object fields/methods and ancestor type names are detected as required by OOE (fjf945*.pas) (@) (O)
* repeated function headings (in `forward' declarations and interfaces) are checked stricter: if one has a result variable, so must the other (according to the OOE draft) (@) (O)
Bugfixes:
* records with no fields are invalid according to EP (fjf972.pas)
* `Index' and `Pos' cannot be used in constant expressions (fjf970*.pas)
* the `__FILE__' and `__BASE_FILE__' macros should return full paths
* `Sqr' sometimes evaluates its argument twice (fjf963.pas)
* memory leak in routines with a local variable of file type that are left via `Exit' or `Return' (fjf962.pas)
* using a Boolean function as a condition in a `repeat' loop doesn't work correctly (artur1*.pas)
* overstrict type-checking in comparisons involving procedural types (fjf960*.pas)
* `Read', `Write' etc. evaluate its arguments in the wrong order (az43*.pas)
* `Read' etc. evaluate references to string parameters twice (fjf958.pas)
* on targets with 16 bit `Integer' type, the `MicroSecond' field of `TimeStamp' causes a compilation error
* character arrays indexed by non-integer ordinal types treated as strings cause internal compiler errors (fjf957*.pas)
* `-W[no-]cast-align' does not work (fjf956*.pas)
* in `FormatTime' `%Z' and `%z' unless provided by system library ignore DST
* powerpc: `--strength-reduce' doesn't work with `for' loops (was kludged before, fixed in gcc-3.3.3)
* AIX: `ReturnAddress' doesn't work after use of dynmamic variables (backend bug, fixed in gcc-3.3.3)
* functions returning sets are called twice if range-checking is on (inga1*.pas)
PORTING GUIDE FOR THE NEW C COMPATIBLE INTEGER TYPES ====================================================
In my experience, the transition goes as follows:
1. If you want your code to keep working with older GPC versions after this change, add (near the top) the following part. You can omit the types you will not need in the following.
{$if __GPC_RELEASE__ < 20041017} type CInteger = Integer; CCardinal = Cardinal; CWord = Word; {$endif}
2. In all C-visible declarations, replace `Integer' with `CInteger' and `Cardinal'/`Word' with `CCardinal'/`CWord'.
C-visible declarations are usually `external' declarations (routines and/or variables) in Pascal which are implemented in C, but they can also be Pascal-implemented declarations (usually with a `name' attribute) which are declared `extern' in C code.
Do not forget structures that are used within such declarations, e.g. parameters of type [pointer to] a record, or procedural parameters, etc.
The same goes for other languages such as C++.
3. Fix any resulting incompatibilites. (This is the nasty part.)
Value parameters are usually no problem.
Anything else might be a problem, e.g., reference parameters, variables, structure fields, procedural parameters' parameters (including value parameters). As long as they are used only in the implementation of a unit/module which exports a Pascal interface, necessary changes can be confined to and handled within this interfaec.
Otherwise, you have the choice whether to change the interface, which will require further changes in code using the interface, or to add wrappers to keep the interface.
Example:
unit MyCInterface;
interface
uses GPC;
type t = record x, y, z: Integer end;
procedure a (n: Integer); external name 'a'; procedure b (var n: Integer); external name 'b'; procedure c (var r: t); external name 'c'; function d (var n: Integer): TString;
implementation
function cd (var n: Integer): CString; external name 'd';
function d (var n: Integer): TString; begin d := CString2String (cd (n)) end;
end.
Changing a to
procedure a (n: CInteger); external name 'a';
is usually harmless.
Changing b to
procedure b (var n: CInteger); external name 'b';
is problematic, since all callers would need to change their types (which might cause further ramifications in indirectly dependent code). So it might be in order to add a wrapper, such as:
procedure b (var n: Integer);
[implementation]
procedure cb (var n: CInteger); external name 'b';
procedure b (var n: Integer); var cn: CInteger; begin cn := n; { omit if n is used only as an "output" parameter } cb (n); n := cn end;
Procedure c uses a record containing `Integer' fields. Here, it's a hard choice between adding a wrapper (might be expensive, as the record gets bigger, and if more routines are affected) or changing the record to:
type t = record x, y, z: CInteger end;
The choice might depend on how many other routines use this structure and how many of them are written in Pascal or C, and how much existing code already uses the structure and what it does with it.
Function d already has a wrapper, so it's usually best to also take care of the new change there:
function d (var n: Integer): TString; var cn: CInteger; begin cn := n; { omit if n is used only as an "output" parameter } d := CString2String (cd (n)) n := cn end;
Finally, note that `Integer' might be bigger than `CInteger', especially on newer platforms (that's the reason for the whole change in the first place). So if you want to have a bigger range available, you might want to consider changing from `CInteger' etc. (`[unsigned] int' in C) to `MedInt' etc. (`[unsigned] long' in C). This, however, requires (possibly substantial) changes in the C code, and might be out of your control (when interfacing to 3rd party libraries).
Frank
-- Frank Heckenbach, frank@g-n-u.de, http://fjf.gnu.de/, 7977168E GPC To-Do list, latest features, fixed bugs: http://www.gnu-pascal.de/todo.html NEW! GPC download signing key: ACB3 79B2 7EB2 B7A7 EFDE D101 CD02 4C9D 0FE0 E5E8
I wrote:
I have uploaded a new beta version of GPC to http://www.g-n-u.de/gpc/!
PS: Another important change is that the file and I/O handling in the RTS is now written in Pascal, while formerly a large part of it was written in C. This change has improved several things, but of course, it's possible that errors crept in during the rewrite. So if you experience any new I/O related bugs in this release, please report.
Frank
On 17 Oct 2004 at 15:41, Frank Heckenbach wrote:
I have uploaded a new beta version of GPC to http://www.g-n-u.de/gpc/!
Compiles okay under Mingw. My initial tests (a program that uses the Crt unit) throws up this:
"In file included from d:/mingw/lib/gcclib/mingw32/3.2.3/units/crtc.c:46: d:/mingw/include/unistd.h:23: error: syntax error before "off_t" d:/mingw/include/unistd.h:24: error: syntax error before "off_t" d:/mingw/include/unistd.h: In function `ftruncate': d:/mingw/include/unistd.h:26: error: `__fd' undeclared (first use in this function) d:/mingw/include/unistd.h:26: error: (Each undeclared identifier is reported only once d:/mingw/include/unistd.h:26: error: for each function it appears in.) d:/mingw/include/unistd.h:26: error: `__length' undeclared (first use in this function)"
Any clues? This is the offending code in unistd.h:
/* This is defined as a real library function to allow autoconf to verify its existence. */ int ftruncate(int, off_t); __CRT_INLINE int ftruncate(int __fd, off_t __length) { return _chsize (__fd, __length); }
Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.greatchief.plus.com/
On 17 Oct 2004 at 19:12, I wrote:
Compiles okay under Mingw. My initial tests (a program that uses the Crt unit) throws up this:
"In file included from d:/mingw/lib/gcclib/mingw32/3.2.3/units/crtc.c:46: d:/mingw/include/unistd.h:23: error: syntax error before "off_t"
[...]
Looking at crtc.c, I find this: #ifdef __MINGW32__ #undef _NO_OLDNAMES #define _NO_OLDNAMES 1 #endif
Looking at sys/types.h, I find this: #ifndef _NO_OLDNAMES typedef _off_t off_t; #endif
So there seems to a problem here ...
Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.greatchief.plus.com/
Prof A Olowofoyeku (The African Chief) wrote:
On 17 Oct 2004 at 19:12, I wrote:
Compiles okay under Mingw. My initial tests (a program that uses the Crt unit) throws up this:
"In file included from d:/mingw/lib/gcclib/mingw32/3.2.3/units/crtc.c:46: d:/mingw/include/unistd.h:23: error: syntax error before "off_t"
[...]
Looking at crtc.c, I find this: #ifdef __MINGW32__ #undef _NO_OLDNAMES #define _NO_OLDNAMES 1 #endif
Looking at sys/types.h, I find this: #ifndef _NO_OLDNAMES typedef _off_t off_t; #endif
So there seems to a problem here ...
Looks like a bug in the mingw headers. If `ftruncate' in unistd.h uses `off_t', but the other headers don't declare this type (if `_NO_OLDNAMES' is set), there's something wrong.
BTW, according to the comment in crtc.c, `_NO_OLDNAMES' is defined in order to prevent stdlib.h from declaring a `beep' function which would conflict with PDCurses' one. Since `beep' belongs to the curses standard, it would be a bug for stdlib.h to define its own version. If this bug is fixed by now, we could remove `_NO_OLDNAMES'. This would avoid the first bug, though not really solve it.
You might report this to the mingw maintainers.
BTW, AFAIK, there weren't any related changes in GPC or CRT recently, so I suppose something was changed in the mingw headers.
Frank
On 17 Oct 2004 at 21:05, Frank Heckenbach wrote:
[...]
Looking at crtc.c, I find this: #ifdef __MINGW32__ #undef _NO_OLDNAMES #define _NO_OLDNAMES 1 #endif
Looking at sys/types.h, I find this: #ifndef _NO_OLDNAMES typedef _off_t off_t; #endif
So there seems to a problem here ...
Looks like a bug in the mingw headers. If `ftruncate' in unistd.h uses `off_t', but the other headers don't declare this type (if `_NO_OLDNAMES' is set), there's something wrong.
As a matter of fact, there are several things in sys/types.h that are not declared if _NO_OLDNAMES is set (including dev_t, ssize_t, pid_t, etc.). I guess that one should never set _NO_OLDNAMES :(
BTW, according to the comment in crtc.c, `_NO_OLDNAMES' is defined in order to prevent stdlib.h from declaring a `beep' function which would conflict with PDCurses' one. Since `beep' belongs to the curses standard, it would be a bug for stdlib.h to define its own version. If this bug is fixed by now, we could remove `_NO_OLDNAMES'. This would avoid the first bug, though not really solve it.
stdlib.h no longer has 'beep' (but it has '_beep')
You might report this to the mingw maintainers.
Hmmm ....
BTW, AFAIK, there weren't any related changes in GPC or CRT recently, so I suppose something was changed in the mingw headers.
Yes, that is correct. The mingw headers have changed a lot (doesn't seem to affect C programs negatively, though, and gcc/gpc compile without a problem).
Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.greatchief.plus.com/
Prof A Olowofoyeku (The African Chief) wrote:
As a matter of fact, there are several things in sys/types.h that are not declared if _NO_OLDNAMES is set (including dev_t, ssize_t, pid_t, etc.). I guess that one should never set _NO_OLDNAMES :(
stdlib.h no longer has 'beep' (but it has '_beep')
OK, then please try removing those lines from crtc.c and let me know if everything works.
Frank
On 17 Oct 2004 at 22:56, Frank Heckenbach wrote:
Prof A Olowofoyeku (The African Chief) wrote:
As a matter of fact, there are several things in sys/types.h that are not declared if _NO_OLDNAMES is set (including dev_t, ssize_t, pid_t, etc.). I guess that one should never set _NO_OLDNAMES :(
stdlib.h no longer has 'beep' (but it has '_beep')
OK, then please try removing those lines from crtc.c and let me know if everything works.
Yes, it does work after removing those lines ...
Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.greatchief.plus.com/
Prof A Olowofoyeku (The African Chief) wrote:
On 17 Oct 2004 at 22:56, Frank Heckenbach wrote:
Prof A Olowofoyeku (The African Chief) wrote:
As a matter of fact, there are several things in sys/types.h that are not declared if _NO_OLDNAMES is set (including dev_t, ssize_t, pid_t, etc.). I guess that one should never set _NO_OLDNAMES :(
stdlib.h no longer has 'beep' (but it has '_beep')
OK, then please try removing those lines from crtc.c and let me know if everything works.
Yes, it does work after removing those lines ...
Good. I'll do this for the next release. (Finally a temporary workaround that was really temporary. :-)
Frank
On 18 Oct 2004 at 12:20, Frank Heckenbach wrote:
[...]
stdlib.h no longer has 'beep' (but it has '_beep')
OK, then please try removing those lines from crtc.c and let me know if everything works.
Yes, it does work after removing those lines ...
Good. I'll do this for the next release. (Finally a temporary workaround that was really temporary. :-)
Indeed - a good result ... ;)
Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.greatchief.plus.com/
"Prof A Olowofoyeku (The African Chief)" wrote:
On 18 Oct 2004 at 12:20, Frank Heckenbach wrote:
[...]
Good. I'll do this for the next release. (Finally a temporary workaround that was really temporary. :-)
Indeed - a good result ... ;)
In this entire exchange nothing gets correctly threaded here. I believe this is due to your newsreader chopping off the references line. This effect is very annoying to others.
Each of your replies is linked only to your previous reply. At least 20 previous references are supposed to be retained, and I believe the proper chopping point is 1000 bytes of reference header.
In the past the fouled sequence has been evident, but the cause has not been so obvious.
On 19 Oct 2004 at 5:41, CBFalconer wrote:
"Prof A Olowofoyeku (The African Chief)" wrote:
On 18 Oct 2004 at 12:20, Frank Heckenbach wrote:
[...]
Good. I'll do this for the next release. (Finally a temporary workaround that was really temporary. :-)
Indeed - a good result ... ;)
In this entire exchange nothing gets correctly threaded here. I believe this is due to your newsreader chopping off the references line.
What newsreader? I get all this by email and reply by email too.
Best regards, The Chief --------- Prof. Abimbola Olowofoyeku (The African Chief) Web: http://www.bigfoot.com/~african_chief/
"Prof. A Olowofoyeku (The African Chief)" wrote:
On 19 Oct 2004 at 5:41, CBFalconer wrote:
"Prof A Olowofoyeku (The African Chief)" wrote:
On 18 Oct 2004 at 12:20, Frank Heckenbach wrote:
[...]
Good. I'll do this for the next release. (Finally a temporary workaround that was really temporary. :-)
Indeed - a good result ... ;)
In this entire exchange nothing gets correctly threaded here. I believe this is due to your newsreader chopping off the references line.
What newsreader? I get all this by email and reply by email too.
So do I, but the reader does proper threading and referencing. See RFC2822. A small excerpt follows:
The "References:" field will contain the contents of the parent's "References:" field (if any) followed by the contents of the parent's "Message-ID:" field (if any). If the parent message does not contain a "References:" field but does have an "In-Reply-To:" field containing a single message identifier, then the "References:" field will contain the contents of the parent's "In-Reply-To:" field followed by the contents of the parent's "Message-ID:" field (if any). If the parent has none of the "References:", "In-Reply-To:", or "Message-ID:" fields, then the new message will have no "References:" field.
Note: Some implementations parse the "References:" field to display the "thread of the discussion". These implementations assume that each new message is a reply to a single parent and hence that they can walk backwards through the "References:" field to find the parent of each message listed there. Therefore, trying to form a "References:" field for a reply that has multiple parents is discouraged and how to do so is not defined in this document.
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
Adriaan van Os wrote:
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
Not yet included, in order to avoid further delays, especially because of the `CInteger' changes.
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::
- 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
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;
I think the 3.3.5 code is alright without patch. (Waldek?)
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.
Fix attached (from Waldek, with a change of mine to make it work in units as well). (avo2*.pas)
Frank
Frank Heckenbach wrote:
Adriaan van Os wrote:
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
Not yet included, in order to avoid further delays, especially because of the `CInteger' changes.
What about a DJGPP version to match gcc 3.4.2?
Adriaan van Os wrote:
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::
<snip>
- gcc/emit-rtl.c
<snip>
Change in gcc-3.3.5 is equivalent to gpc patch -- so currently one can just ingore the patch failure (and we can remove the hunk for gcc-3.3.5).
On Sun, 17 Oct 2004, Frank Heckenbach wrote:
I have uploaded a new beta version of GPC to http://www.g-n-u.de/gpc/!
My attempt to compile this snapshot dies with the following message:
/install/gpc/build/gcc/xgcc -B/install/gpc/build/gcc/ -B/usr/local/i686-pc-linux-gnu/bin/ -B/usr/local/i686-pc-linux-gnu/lib/ -isystem /usr/local/i686-pc-linux-gnu/include -c -I. -W -Wall -Wmissing-prototypes -Wmissing-declarations -g -O2 -Wpointer-arith -Wwrite-strings /install/gpc/gcc-3.3.1/gcc/p/rts/rts.c /install/gpc/gcc-3.3.1/gcc/p/rts/rts.c:237: error: conflicting types for `sys_siglist' /usr/include/signal.h:298: error: previous declaration of `sys_siglist' make[2]: *** [rts.o] Error 1 make[2]: Leaving directory `/install/gpc/build/gcc/p/rts' make[1]: *** [pascal.rts] Error 2 make[1]: Leaving directory `/install/gpc/build/gcc' make: *** [all-gcc] Error 2
Any clues?
My /usr/include/signal.h contains these declarations:
/* Names of the signals. This variable exists only for compatibility. Use `strsignal' instead (see <string.h>). */ extern __const char *__const _sys_siglist[_NSIG]; extern __const char *__const sys_siglist[_NSIG];
Regards, Adam Naumowicz
====================================================================== Department of Applied Logic fax. +48 (85) 745-7662 Institute of Computer Science tel. +48 (85) 745-7559 (office) University of Bialystok e-mail: adamn@mizar.org Sosnowa 64, 15-887 Bialystok, Poland http://math.uwb.edu.pl/~adamn/ ======================================================================
Adam Naumowicz wrote:
On Sun, 17 Oct 2004, Frank Heckenbach wrote:
I have uploaded a new beta version of GPC to http://www.g-n-u.de/gpc/!
My attempt to compile this snapshot dies with the following message:
/install/gpc/build/gcc/xgcc -B/install/gpc/build/gcc/ -B/usr/local/i686-pc-linux-gnu/bin/ -B/usr/local/i686-pc-linux-gnu/lib/ -isystem /usr/local/i686-pc-linux-gnu/include -c -I. -W -Wall -Wmissing-prototypes -Wmissing-declarations -g -O2 -Wpointer-arith -Wwrite-strings /install/gpc/gcc-3.3.1/gcc/p/rts/rts.c /install/gpc/gcc-3.3.1/gcc/p/rts/rts.c:237: error: conflicting types for `sys_siglist' /usr/include/signal.h:298: error: previous declaration of `sys_siglist' make[2]: *** [rts.o] Error 1 make[2]: Leaving directory `/install/gpc/build/gcc/p/rts' make[1]: *** [pascal.rts] Error 2 make[1]: Leaving directory `/install/gpc/build/gcc' make: *** [all-gcc] Error 2
Any clues?
My /usr/include/signal.h contains these declarations:
/* Names of the signals. This variable exists only for compatibility. Use `strsignal' instead (see <string.h>). */ extern __const char *__const _sys_siglist[_NSIG]; extern __const char *__const sys_siglist[_NSIG];
Sorry for the late reply. If the problem still exists, try this patch. If it doesn't help, I need more context from the headers (in particular the conditionals that the above declarations are within).
--- p/rts/rts.c.orig Tue Feb 15 04:19:45 2005 +++ p/rts/rts.c Tue Feb 15 04:19:55 2005 @@ -235,6 +235,7 @@ #define environ __environ #endif
+#if !defined (HAVE_STRSIGNAL) && !defined (strsignal) #if defined (HAVE_SYS_SIGLIST) || defined (sys_siglist) #if !defined (sys_siglist) && !defined (SYS_SIGLIST_DECLARED) extern char **sys_siglist; @@ -245,6 +246,7 @@ #endif #define sys_siglist _sys_siglist #endif +#endif #ifndef SIGMAX #ifdef HAVE__SYS_NSIG #ifndef _SYS_NSIG_DECLARED
Frank
Frank Heckenbach wrote:
I have uploaded a new beta version of GPC to http://www.g-n-u.de/gpc/!
<snip>
Bugfixes:
- records with no fields are invalid according to EP (fjf972.pas)
IMHO records with no fields are valid in EP (so fjf972.pas is valid in EP mode). Namely, in 6.4.3.4 (at the end of page 32) we have:
A field-list containing neither a fixed-part nor a variant-part shall have no components, shall determine a single value-bearing state bearing a null value, shall be designated empty, and shall denote the totally-undefined initial state.
I take it as an explicit permission to have empty records.
Waldek Hebisch wrote:
Frank Heckenbach wrote:
I have uploaded a new beta version of GPC to http://www.g-n-u.de/gpc/!
<snip> > Bugfixes: > > * records with no fields are invalid according to EP (fjf972.pas) >
IMHO records with no fields are valid in EP (so fjf972.pas is valid in EP mode). Namely, in 6.4.3.4 (at the end of page 32) we have:
A field-list containing neither a fixed-part nor a variant-part shall have no components, shall determine a single value-bearing state bearing a null value, shall be designated empty, and shall denote the totally-undefined initial state.
I take it as an explicit permission to have empty records.
You're right, I misread it. I'll undo the change.
Frank
Waldek Hebisch wrote:
Frank Heckenbach wrote:
I have uploaded a new beta version of GPC to http://www.g-n-u.de/gpc/!
<snip> > Bugfixes: > > * records with no fields are invalid according to EP (fjf972.pas) >
IMHO records with no fields are valid in EP (so fjf972.pas is valid in EP mode). Namely, in 6.4.3.4 (at the end of page 32) we have:
A field-list containing neither a fixed-part nor a variant-part shall have no components, shall determine a single value-bearing state bearing a null value, shall be designated empty, and shall denote the totally-undefined initial state.
I take it as an explicit permission to have empty records.
I recall the original Pascal test suite specifically testing for empty records, and complaining about the foolishness of it.
Hi,
On Sun, Oct 17, 2004 at 03:00:30PM +0200, Frank Heckenbach wrote:
I have uploaded a new beta version of GPC to http://www.g-n-u.de/gpc/!
[..]
Compiled and tested with gcc-3.3.3 on AIX 5.1 today.
Test suite runs without any problems:
Test Run By gd on 2004-10-25 13:43:59 Native configuration is powerpc-ibm-aix5.1.0.0 (hilb1)
=== gpc tests ===
Running target any Running testsuite ...
UNSUPPORTED: aregextest.pas UNSUPPORTED: asmtest.pas UNSUPPORTED: crttest.pas UNSUPPORTED: gmptest.pas UNSUPPORTED: longr2.pas
=== gpc Summary ===
# of tests 3999 # of expected passes 3994 # of unsupported tests 5
good work!
gert