Ok, I'd like to report that with the patch you sent me privately, I was able to compile https://github.com/hebisch/gpc=20
combined with ftp://ftp.gnu.org/gnu/gcc/gcc-3.4.6/gcc-core-3.4.6.tar.bz2 using Ubuntu 20.10 compiler:
was to say default but:
gcc (GCC) 9.3.1 20200430 (for GNAT Community 2020 20200818)
paul@jacko:~/gpc$ gpc --version
gpc 20070904, based on gcc-3.4.6
paul@jacko:~/gpc$ /usr/local/bin/gcc --version
gcc (GCC) 3.4.6
I did had to edit p/doc/hr/gpc.texi to begins:
--…
[View More]------------------------------------------------
\input texinfo
@setfilename gpc-hr.info
@documentencoding iso-8859-2
@settitle GNU Pascal priru<E8>nik.
@c We use Latin 2 charset for hr_HR language.
@set charset iso-8859-2
-----------------
and p/doc/es/gpcs.texi to begins:
-----------------------
\input texinfo
@setfilename gpcs.info
@documentencoding iso-8859-1
@settitle Est<E1>ndar de Codificaci<F3>n GNU Pascal
@c Copyright (C) 2001-2006 Free Software Foundation, Inc.
@c
@c Authors: Frank Heckenbach <mailto:frank@pascal.gnu.de>
@c Peter Gerwinski <mailto:peter@gerwinski.de>
@c Nicola Girardi <mailto:nicola@g-n-u.de>
@c
@c Remember to update this when you save
@set lastupdate 2006-02-02
@direntry
* Est<E1>ndares de Codificaci<F3>n Pascal: (gpcs). Est<E1>ndares de codificaci<F3>n GNU Pascal.
@end direntry
-----------------------------
So I moved @documentencoding before @settitle when it was using some special characters... but I now see emacs did transform the characters in the document too.
And now I can:
paul@jacko:~/gpc$ rm a.out hello
paul@jacko:~/gpc$ gpc -o hello ../gpc2/gcc-3.4.6/gcc/p/demos/hello.pas
paul@jacko:~/gpc$ ls -lh
total 548K
-rwxrwxr-x 1 paul paul 546K mar 6 14:21 hello
paul@jacko:~/gpc$ ./hello
Hello, world.
paul@jacko:~/gpc$ gpc ../gpc2/gcc-3.4.6/gcc/p/demos/readdirdemo.pas
../gpc2/gcc-3.4.6/gcc/p/demos/readdirdemo.pas:31: erreur: module/unit interface `GPC' could not be imported
paul@jacko:~/gpc$ LANG=C gpc ../gpc2/gcc-3.4.6/gcc/p/demos/readdirdemo.pas
../gpc2/gcc-3.4.6/gcc/p/demos/readdirdemo.pas:31: error: module/unit interface `GPC' could not be imported
paul@jacko:~/gpc$
Will need to figure out what to do to make that working.
[View Less]
paul@jacko:~/gpc1-build$ LANG=C make
make[1]: Entering directory '/home/paul/gpc1-build/libiberty'
make[2]: Entering directory '/home/paul/gpc1-build/libiberty/testsuite'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/paul/gpc1-build/libiberty/testsuite'
make[1]: Leaving directory '/home/paul/gpc1-build/libiberty'
make[1]: Entering directory '/home/paul/gpc1-build/intl'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/paul/gpc1-build/…
[View More]intl'
make[1]: Entering directory '/home/paul/gpc1-build/gcc'
cd ../../gpc1/gcc-3.4.6/gcc/p/rts && make -f Makefile.in srcdir=. GCC_VERSION="3.4.6" SHELL="/bin/sh" CFLAGS="-g -O2" PFLAGS="" AR_FLAGS="rc" RTSFLAGS="" GPC_DESTDIR="../.." AR="ar" RANLIB="ranlib" RANLIB_TEST="" generated-files
make[2]: Entering directory '/home/paul/gpc1/gcc-3.4.6/gcc/p/rts'
make[2]: Nothing to be done for 'generated-files'.
make[2]: Leaving directory '/home/paul/gpc1/gcc-3.4.6/gcc/p/rts'
cd ../../gpc1/gcc-3.4.6/gcc/p/rts && make -f Makefile.in srcdir=. GCC_VERSION="3.4.6" SHELL="/bin/sh" CFLAGS="-g -O2" PFLAGS="" AR_FLAGS="rc" RTSFLAGS="" GPC_DESTDIR="../.." AR="ar" RANLIB="ranlib" RANLIB_TEST="" generated-files
make[2]: Entering directory '/home/paul/gpc1/gcc-3.4.6/gcc/p/rts'
make[2]: Nothing to be done for 'generated-files'.
make[2]: Leaving directory '/home/paul/gpc1/gcc-3.4.6/gcc/p/rts'
cd ../../gpc1/gcc-3.4.6/gcc/p/rts && make -f Makefile.in srcdir=. GCC_VERSION="3.4.6" SHELL="/bin/sh" CFLAGS="-g -O2" PFLAGS="" AR_FLAGS="rc" RTSFLAGS="" GPC_DESTDIR="../.." AR="ar" RANLIB="ranlib" RANLIB_TEST="" generated-files
make[2]: Entering directory '/home/paul/gpc1/gcc-3.4.6/gcc/p/rts'
make[2]: Nothing to be done for 'generated-files'.
make[2]: Leaving directory '/home/paul/gpc1/gcc-3.4.6/gcc/p/rts'
cd ../../gpc1/gcc-3.4.6/gcc/p/rts && make -f Makefile.in srcdir=. GCC_VERSION="3.4.6" SHELL="/bin/sh" CFLAGS="-g -O2" PFLAGS="" AR_FLAGS="rc" RTSFLAGS="" GPC_DESTDIR="../.." AR="ar" RANLIB="ranlib" RANLIB_TEST="" generated-files
make[2]: Entering directory '/home/paul/gpc1/gcc-3.4.6/gcc/p/rts'
make[2]: Nothing to be done for 'generated-files'.
make[2]: Leaving directory '/home/paul/gpc1/gcc-3.4.6/gcc/p/rts'
cd ../../gpc1/gcc-3.4.6/gcc/p/rts && make -f Makefile.in srcdir=. GCC_VERSION="3.4.6" SHELL="/bin/sh" CFLAGS="-g -O2" PFLAGS="" AR_FLAGS="rc" RTSFLAGS="" GPC_DESTDIR="../.." AR="ar" RANLIB="ranlib" RANLIB_TEST="" generated-files
make[2]: Entering directory '/home/paul/gpc1/gcc-3.4.6/gcc/p/rts'
make[2]: Nothing to be done for 'generated-files'.
make[2]: Leaving directory '/home/paul/gpc1/gcc-3.4.6/gcc/p/rts'
make[1]: Circular libgcc.a <- pascal dependency dropped.
make \
CFLAGS="-g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long " \
CONFIG_H="tconfig.h ../../gpc1/gcc-3.4.6/gcc/../include/ansidecl.h" TM_H="tm.h ../../gpc1/gcc-3.4.6/gcc/config/i386/biarch64.h ../../gpc1/gcc-3.4.6/gcc/config/i386/i386.h ../../gpc1/gcc-3.4.6/gcc/config/i386/unix.h ../../gpc1/gcc-3.4.6/gcc/config/i386/att.h ../../gpc1/gcc-3.4.6/gcc/config/dbxelf.h ../../gpc1/gcc-3.4.6/gcc/config/elfos.h ../../gpc1/gcc-3.4.6/gcc/config/svr4.h ../../gpc1/gcc-3.4.6/gcc/config/linux.h ../../gpc1/gcc-3.4.6/gcc/config/i386/x86-64.h ../../gpc1/gcc-3.4.6/gcc/config/i386/linux64.h ../../gpc1/gcc-3.4.6/gcc/defaults.h insn-constants.h insn-flags.h" \
INCLUDES="-I. -I. -I../../gpc1/gcc-3.4.6/gcc -I../../gpc1/gcc-3.4.6/gcc/. -I../../gpc1/gcc-3.4.6/gcc/../include " \
MAKEOVERRIDES= \
-f libgcc.mk all
make[2]: Entering directory '/home/paul/gpc1-build/gcc'
for d in libgcc 32 libgcc/32; do \
if [ -d $d ]; then true; else /bin/sh ../../gpc1/gcc-3.4.6/gcc/mkinstalldirs $d; fi; \
done
if [ -f stmp-dirs ]; then true; else touch stmp-dirs; fi
/home/paul/gpc1-build/gcc/xgcc -B/home/paul/gpc1-build/gcc/ -B/usr/local/x86_64-unknown-linux-gnu/bin/ -B/usr/local/x86_64-unknown-linux-gnu/lib/ -isystem /usr/local/x86_64-unknown-linux-gnu/include -isystem /usr/local/x86_64-unknown-linux-gnu/sys-include -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -I. -I. -I../../gpc1/gcc-3.4.6/gcc -I../../gpc1/gcc-3.4.6/gcc/. -I../../gpc1/gcc-3.4.6/gcc/../include -fexceptions -c ../../gpc1/gcc-3.4.6/gcc/unwind-dw2.c -o libgcc/./unwind-dw2.o
../../gpc1/gcc-3.4.6/gcc/unwind-dw2.c: In function `uw_frame_state_for':
../../gpc1/gcc-3.4.6/gcc/unwind-dw2.c:1031: error: dereferencing pointer to incomplete type
make[2]: *** [libgcc.mk:236: libgcc/./unwind-dw2.o] Error 1
make[2]: Leaving directory '/home/paul/gpc1-build/gcc'
make[1]: *** [Makefile:1228: libgcc.a] Error 2
make[1]: Leaving directory '/home/paul/gpc1-build/gcc'
make: *** [Makefile:23375: all-gcc] Error 2
paul@jacko:~/gpc1-build$
"The “dereferencing pointer to incomplete type” error commonly occurs in C when one tries to dereference a type (usually a struct) that is:
not declared at all.
declared, but not defined.
The error in the first bullet point occurs because C cannot
find the struct that is being dereferenced. The reason for this could be
that the struct may not have been declared, or that the user made a
typographical error in the struct’s name"
from: https://www.educative.io/edpresso/resolving-the-dereferencing-pointer-to-in…
At this stage, it seems to use generated xgcc to compile itself... a bit weird it get errors at this stage to me.
Will investigate a bit more later.
[View Less]
Hi!
Just tried to compiled gpc.
Used http://www.gnu-pascal.de/alpha/gpc-20050331-minimal.tar.bz2
and http://www.gnu-pascal.de/alpha/gcc-core-3.4.4.tar.bz2
Using:
paul@jacko:~/gpc-build$ gcc --version
gcc (Ubuntu 10.2.0-13ubuntu1) 10.2.0
And got:
[...]
In file included from ../../gpc/gcc-3.4.4/gcc/p/declarations.c:29:
../../gpc/gcc-3.4.4/gcc/p/declarations.c: In function ‘pushdecl_import’:
../../gpc/gcc-3.4.4/gcc/p/gpc.h:68:68: warning: ISO C does not support ‘…
[View More]__PRETTY_FUNCTION__’ predefined identifier [-Wpedantic]
68 | ((void) ((expression) ? 0 : (assert_fail (#expression, __FILE__, __PRETTY_FUNCTION__, __LINE__), 0)))
| ^~~~~~~~~~~~~~~~~~~
../../gpc/gcc-3.4.4/gcc/p/declarations.c:1062:3: note: in expansion of macro ‘gcc_assert’
1062 | gcc_assert (!PASCAL_DECL_WEAK (x));
| ^~~~~~~~~~
../../gpc/gcc-3.4.4/gcc/p/declarations.c:1076:30: warning: comparison between ‘enum tree_code’ and ‘enum pascal_tree_code’ [-Wenum-compare]
1076 | if (old && TREE_CODE (old) == OPERATOR_DECL && TREE_CODE (x) == OPERATOR_DECL)
| ^~
../../gpc/gcc-3.4.4/gcc/p/declarations.c:1076:64: warning: comparison between ‘enum tree_code’ and ‘enum pascal_tree_code’ [-Wenum-compare]
1076 | if (old && TREE_CODE (old) == OPERATOR_DECL && TREE_CODE (x) == OPERATOR_DECL)
| ^~
In file included from ../../gpc/gcc-3.4.4/gcc/p/declarations.c:29:
../../gpc/gcc-3.4.4/gcc/p/declarations.c: In function ‘declare_label’:
../../gpc/gcc-3.4.4/gcc/p/gpc.h:68:68: warning: ISO C does not support ‘__PRETTY_FUNCTION__’ predefined identifier [-Wpedantic]
68 | ((void) ((expression) ? 0 : (assert_fail (#expression, __FILE__, __PRETTY_FUNCTION__, __LINE__), 0)))
| ^~~~~~~~~~~~~~~~~~~
../../gpc/gcc-3.4.4/gcc/p/declarations.c:1142:3: note: in expansion of macro ‘gcc_assert’
1142 | gcc_assert (!EM (label));
| ^~~~~~~~~~
../../gpc/gcc-3.4.4/gcc/p/declarations.c: In function ‘lookup_name’:
../../gpc/gcc-3.4.4/gcc/p/declarations.c:1324:31: warning: comparison between ‘enum tree_code’ and ‘enum pascal_tree_code’ [-Wenum-compare]
1324 | if (t && (TREE_CODE (t) == OPERATOR_DECL && PASCAL_BUILTIN_OPERATOR (t)))
| ^~
In file included from ../../gpc/gcc-3.4.4/gcc/p/declarations.c:29:
../../gpc/gcc-3.4.4/gcc/p/declarations.c: In function ‘get_unique_identifier’:
../../gpc/gcc-3.4.4/gcc/p/gpc.h:68:68: warning: ISO C does not support ‘__PRETTY_FUNCTION__’ predefined identifier [-Wpedantic]
68 | ((void) ((expression) ? 0 : (assert_fail (#expression, __FILE__, __PRETTY_FUNCTION__, __LINE__), 0)))
| ^~~~~~~~~~~~~~~~~~~
../../gpc/gcc-3.4.4/gcc/p/declarations.c:1490:3: note: in expansion of macro ‘gcc_assert’
1490 | gcc_assert (*template >= 'a' && *template <= 'z');
| ^~~~~~~~~~
../../gpc/gcc-3.4.4/gcc/p/declarations.c: In function ‘check_identifier’:
../../gpc/gcc-3.4.4/gcc/p/gpc.h:68:68: warning: ISO C does not support ‘__PRETTY_FUNCTION__’ predefined identifier [-Wpedantic]
68 | ((void) ((expression) ? 0 : (assert_fail (#expression, __FILE__, __PRETTY_FUNCTION__, __LINE__), 0)))
| ^~~~~~~~~~~~~~~~~~~
../../gpc/gcc-3.4.4/gcc/p/declarations.c:1557:7: note: in expansion of macro ‘gcc_assert’
1557 | gcc_assert (DECL_INITIAL (decl));
| ^~~~~~~~~~
../../gpc/gcc-3.4.4/gcc/p/declarations.c: In function ‘lookup_c_type’:
../../gpc/gcc-3.4.4/gcc/p/gpc.h:70:71: warning: ISO C does not support ‘__PRETTY_FUNCTION__’ predefined identifier [-Wpedantic]
70 | #define gcc_unreachable() (assert_fail ("unreachable code", __FILE__, __PRETTY_FUNCTION__, __LINE__))
| ^~~~~~~~~~~~~~~~~~~
../../gpc/gcc-3.4.4/gcc/p/declarations.c:1625:3: note: in expansion of macro ‘gcc_unreachable’
1625 | gcc_unreachable ();
| ^~~~~~~~~~~~~~~
../../gpc/gcc-3.4.4/gcc/p/declarations.c: In function ‘make_real’:
../../gpc/gcc-3.4.4/gcc/p/gpc.h:68:68: warning: ISO C does not support ‘__PRETTY_FUNCTION__’ predefined identifier [-Wpedantic]
68 | ((void) ((expression) ? 0 : (assert_fail (#expression, __FILE__, __PRETTY_FUNCTION__, __LINE__), 0)))
| ^~~~~~~~~~~~~~~~~~~
../../gpc/gcc-3.4.4/gcc/p/declarations.c:1636:3: note: in expansion of macro ‘gcc_assert’
1636 | gcc_assert (r > 0);
| ^~~~~~~~~~
../../gpc/gcc-3.4.4/gcc/p/gpc.h:68:68: warning: ISO C does not support ‘__PRETTY_FUNCTION__’ predefined identifier [-Wpedantic]
68 | ((void) ((expression) ? 0 : (assert_fail (#expression, __FILE__, __PRETTY_FUNCTION__, __LINE__), 0)))
| ^~~~~~~~~~~~~~~~~~~
../../gpc/gcc-3.4.4/gcc/p/declarations.c:1638:3: note: in expansion of macro ‘gcc_assert’
1638 | gcc_assert (TREE_TYPE (res) == double_type_node);
| ^~~~~~~~~~
../../gpc/gcc-3.4.4/gcc/p/declarations.c: In function ‘init_decl_processing’:
../../gpc/gcc-3.4.4/gcc/p/declarations.c:1816:3: error: ‘set_word_size’ undeclared (first use in this function); did you mean ‘set_mem_size’?
1816 | set_word_size = set_alignment = TYPE_PRECISION (long_unsigned_type_node);
| ^~~~~~~~~~~~~
| set_mem_size
../../gpc/gcc-3.4.4/gcc/p/declarations.c:1816:3: note: each undeclared identifier is reported only once for each function it appears in
../../gpc/gcc-3.4.4/gcc/p/declarations.c:1817:3: error: ‘set_words_big_endian’ undeclared (first use in this function)
1817 | set_words_big_endian = 0;
| ^~~~~~~~~~~~~~~~~~~~
In file included from ../../gpc/gcc-3.4.4/gcc/p/declarations.c:29:
../../gpc/gcc-3.4.4/gcc/p/declarations.c: In function ‘find_duplicate_fields’:
../../gpc/gcc-3.4.4/gcc/p/gpc.h:68:68: warning: ISO C does not support ‘__PRETTY_FUNCTION__’ predefined identifier [-Wpedantic]
68 | ((void) ((expression) ? 0 : (assert_fail (#expression, __FILE__, __PRETTY_FUNCTION__, __LINE__), 0)))
| ^~~~~~~~~~~~~~~~~~~
../../gpc/gcc-3.4.4/gcc/p/declarations.c:2082:9: note: in expansion of macro ‘gcc_assert’
2082 | gcc_assert (dup);
| ^~~~~~~~~~
../../gpc/gcc-3.4.4/gcc/p/declarations.c: In function ‘declare_routine’:
../../gpc/gcc-3.4.4/gcc/p/gpc.h:68:68: warning: ISO C does not support ‘__PRETTY_FUNCTION__’ predefined identifier [-Wpedantic]
68 | ((void) ((expression) ? 0 : (assert_fail (#expression, __FILE__, __PRETTY_FUNCTION__, __LINE__), 0)))
| ^~~~~~~~~~~~~~~~~~~
../../gpc/gcc-3.4.4/gcc/p/declarations.c:2419:3: note: in expansion of macro ‘gcc_assert’
2419 | gcc_assert (!EM (d));
| ^~~~~~~~~~
../../gpc/gcc-3.4.4/gcc/p/declarations.c: In function ‘build_operator_heading’:
../../gpc/gcc-3.4.4/gcc/p/declarations.c:2530:34: warning: implicit conversion from ‘enum pascal_tree_code’ to ‘enum tree_code’ [-Wenum-conversion]
2530 | placeholder_decl = build_decl (OPERATOR_DECL, name, void_type_node);
| ^~~~~~~~~~~~~
In file included from ../../gpc/gcc-3.4.4/gcc/p/declarations.c:29:
../../gpc/gcc-3.4.4/gcc/p/declarations.c: In function ‘start_routine’:
../../gpc/gcc-3.4.4/gcc/p/gpc.h:68:68: warning: ISO C does not support ‘__PRETTY_FUNCTION__’ predefined identifier [-Wpedantic]
68 | ((void) ((expression) ? 0 : (assert_fail (#expression, __FILE__, __PRETTY_FUNCTION__, __LINE__), 0)))
| ^~~~~~~~~~~~~~~~~~~
../../gpc/gcc-3.4.4/gcc/p/declarations.c:2714:9: note: in expansion of macro ‘gcc_assert’
2714 | gcc_assert (IDENTIFIER_IS_BUILT_IN (TREE_VALUE (dir), p_attribute));
| ^~~~~~~~~~
../../gpc/gcc-3.4.4/gcc/p/gpc.h:68:68: warning: ISO C does not support ‘__PRETTY_FUNCTION__’ predefined identifier [-Wpedantic]
68 | ((void) ((expression) ? 0 : (assert_fail (#expression, __FILE__, __PRETTY_FUNCTION__, __LINE__), 0)))
| ^~~~~~~~~~~~~~~~~~~
../../gpc/gcc-3.4.4/gcc/p/declarations.c:2753:3: note: in expansion of macro ‘gcc_assert’
2753 | gcc_assert (!EM (decl));
| ^~~~~~~~~~
../../gpc/gcc-3.4.4/gcc/p/gpc.h:68:68: warning: ISO C does not support ‘__PRETTY_FUNCTION__’ predefined identifier [-Wpedantic]
68 | ((void) ((expression) ? 0 : (assert_fail (#expression, __FILE__, __PRETTY_FUNCTION__, __LINE__), 0)))
| ^~~~~~~~~~~~~~~~~~~
../../gpc/gcc-3.4.4/gcc/p/declarations.c:2798:7: note: in expansion of macro ‘gcc_assert’
2798 | gcc_assert (!DECL_RTL_SET_P (parm));
| ^~~~~~~~~~
../../gpc/gcc-3.4.4/gcc/p/gpc.h:68:68: warning: ISO C does not support ‘__PRETTY_FUNCTION__’ predefined identifier [-Wpedantic]
68 | ((void) ((expression) ? 0 : (assert_fail (#expression, __FILE__, __PRETTY_FUNCTION__, __LINE__), 0)))
| ^~~~~~~~~~~~~~~~~~~
../../gpc/gcc-3.4.4/gcc/p/declarations.c:2824:5: note: in expansion of macro ‘gcc_assert’
2824 | gcc_assert (!resvar);
| ^~~~~~~~~~
../../gpc/gcc-3.4.4/gcc/p/gpc.h:68:68: warning: ISO C does not support ‘__PRETTY_FUNCTION__’ predefined identifier [-Wpedantic]
68 | ((void) ((expression) ? 0 : (assert_fail (#expression, __FILE__, __PRETTY_FUNCTION__, __LINE__), 0)))
| ^~~~~~~~~~~~~~~~~~~
../../gpc/gcc-3.4.4/gcc/p/declarations.c:2851:11: note: in expansion of macro ‘gcc_assert’
2851 | gcc_assert (TREE_CODE (v) == COMPONENT_REF);
| ^~~~~~~~~~
../../gpc/gcc-3.4.4/gcc/p/declarations.c: In function ‘finish_routine’:
../../gpc/gcc-3.4.4/gcc/p/gpc.h:74:101: warning: right-hand operand of comma expression has no effect [-Wunused-value]
74 | #define abort_confused() (error ("confused by previous errors, bailing out"), exit (FATAL_EXIT_CODE), 0)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
../../gpc/gcc-3.4.4/gcc/p/declarations.c:2952:5: note: in expansion of macro ‘abort_confused’
2952 | abort_confused ();
| ^~~~~~~~~~~~~~
../../gpc/gcc-3.4.4/gcc/p/declarations.c: In function ‘declare_types’:
../../gpc/gcc-3.4.4/gcc/p/gpc.h:68:68: warning: ISO C does not support ‘__PRETTY_FUNCTION__’ predefined identifier [-Wpedantic]
68 | ((void) ((expression) ? 0 : (assert_fail (#expression, __FILE__, __PRETTY_FUNCTION__, __LINE__), 0)))
| ^~~~~~~~~~~~~~~~~~~
../../gpc/gcc-3.4.4/gcc/p/declarations.c:3110:9: note: in expansion of macro ‘gcc_assert’
3110 | gcc_assert (!EM (decl));
| ^~~~~~~~~~
../../gpc/gcc-3.4.4/gcc/p/declarations.c: In function ‘shadow_one_level’:
../../gpc/gcc-3.4.4/gcc/p/gpc.h:68:68: warning: ISO C does not support ‘__PRETTY_FUNCTION__’ predefined identifier [-Wpedantic]
68 | ((void) ((expression) ? 0 : (assert_fail (#expression, __FILE__, __PRETTY_FUNCTION__, __LINE__), 0)))
| ^~~~~~~~~~~~~~~~~~~
../../gpc/gcc-3.4.4/gcc/p/declarations.c:3129:3: note: in expansion of macro ‘gcc_assert’
3129 | gcc_assert (TYPE_SIZE (TREE_TYPE (element)) && !PASCAL_TYPE_UNDISCRIMINATED_SCHEMA (TREE_TYPE (element)));
| ^~~~~~~~~~
../../gpc/gcc-3.4.4/gcc/p/declarations.c: In function ‘declare_variables’:
../../gpc/gcc-3.4.4/gcc/p/gpc.h:68:68: warning: ISO C does not support ‘__PRETTY_FUNCTION__’ predefined identifier [-Wpedantic]
68 | ((void) ((expression) ? 0 : (assert_fail (#expression, __FILE__, __PRETTY_FUNCTION__, __LINE__), 0)))
| ^~~~~~~~~~~~~~~~~~~
../../gpc/gcc-3.4.4/gcc/p/declarations.c:3451:11: note: in expansion of macro ‘gcc_assert’
3451 | gcc_assert (!init);
| ^~~~~~~~~~
../../gpc/gcc-3.4.4/gcc/p/gpc.h:68:68: warning: ISO C does not support ‘__PRETTY_FUNCTION__’ predefined identifier [-Wpedantic]
68 | ((void) ((expression) ? 0 : (assert_fail (#expression, __FILE__, __PRETTY_FUNCTION__, __LINE__), 0)))
| ^~~~~~~~~~~~~~~~~~~
../../gpc/gcc-3.4.4/gcc/p/declarations.c:3578:7: note: in expansion of macro ‘gcc_assert’
3578 | gcc_assert (!EM (d));
| ^~~~~~~~~~
../../gpc/gcc-3.4.4/gcc/p/declarations.c: In function ‘new_string_by_model’:
../../gpc/gcc-3.4.4/gcc/p/gpc.h:68:68: warning: ISO C does not support ‘__PRETTY_FUNCTION__’ predefined identifier [-Wpedantic]
68 | ((void) ((expression) ? 0 : (assert_fail (#expression, __FILE__, __PRETTY_FUNCTION__, __LINE__), 0)))
| ^~~~~~~~~~~~~~~~~~~
../../gpc/gcc-3.4.4/gcc/p/declarations.c:3659:7: note: in expansion of macro ‘gcc_assert’
3659 | gcc_assert (isstring);
| ^~~~~~~~~~
make[1]: *** [../../gpc/gcc-3.4.4/gcc/p/Make-lang.in:634 : p/declarations.o] Erreur 1
make[1] : on quitte le répertoire « /home/paul/gpc-build/gcc »
make: *** [Makefile:23375 : all-gcc] Erreur 2
paul@jacko:~/gpc-build$
So isstring is undefined?
[View Less]
Thanks to everyone who responded.
I am trying to write a compliant 7185 compiler from 7185 compliant source.
The problem arose because my compiler produced an error on the construct
described when it compiled itself.
I think that ( b )^.Field1 is a compliant work around because the
expression will be treated as a variable access.
I am using the 7185 spec rather than 10206 because it is much smaller
and within a single person's scope. Also the compiler is intended for
embedded systems …
[View More]where there is less need for advanced features.
Using the 7185 spec as a base grammar will allow for grammar additions,
such a interrupt directives, to be added to a well specified grammar as
small tweaks.
As well, 7185 is specified as a single source file so there is no need
for a link editor to stitch together various pieces of object code to
produce an executable. Without need for a linker, the complier becomes
much more portable. There are many more embedded CPU chips than larger
scale CPUs with operating systems.
Regards,
Paul Isaacs
[View Less]
Hello:
gpc --classic-pascal compiles the following without error:
procedure test;
type
 xHandle            = ^xRecord;
 xRecord            = record
                       field1  : …
[View More]integer;
                      end;
var
 a                  : integer;
 function b         : xHandle;
 var
 c                 : xHandle;
 begin
 b                 := c;
 end;
begin
 a                  := b^.field1;
end;
Is this 7185 compliant?
The right hand side of the assignment is a 6.7.3 function-designator rule :
     function-designator = function-identifier [ actual-parameter-list
] .
followed by "^."
I can not see how the grammar permits the following pointer and record
accesses.
Thank you,
Paul Isaacs
[View Less]
Greetings from a new member of your mailing list.
I have used Gnu Pascal for some time on a Windows 10 64-bit environment.
I decided to try it on a Linux Mint 20 Cinnamon machine with x86_64
processor
I downloaded gpc-2.1-with-gcc.i686-pc-linux-gnu.tar.gz to
/home/peter/software and installed using:
cd /
tar xzf /home/peter/software/gpc-2.1-with-gcc.i686-pc-linux-gnu.tar.gz
I tried the simplest of programs: Hello.c:
program hello;
begin
writeln ('Hello Pascal world');
readln
end.
…
[View More]and compiled by gpc -o Hello Hello.pas
to get, to my dismay, not as on Windows but on Linux:
peter@peter-Akoya-E6237:~/Pete/Pascal$ gpc -o Hello Hello.pas
/tmp/ccnPqfBD.s: Assembler messages:
/tmp/ccnPqfBD.s:15: Error: invalid instruction suffix for `push'
/tmp/ccnPqfBD.s:19: Error: invalid instruction suffix for `push'
/tmp/ccnPqfBD.s:20: Error: invalid instruction suffix for `push'
/tmp/ccnPqfBD.s:21: Error: invalid instruction suffix for `push'
/tmp/ccnPqfBD.s:22: Error: invalid instruction suffix for `push'
/tmp/ccnPqfBD.s:23: Error: invalid instruction suffix for `push'
/tmp/ccnPqfBD.s:24: Error: invalid instruction suffix for `push'
/tmp/ccnPqfBD.s:25: Error: invalid instruction suffix for `push'
/tmp/ccnPqfBD.s:35: Error: invalid instruction suffix for `push'
/tmp/ccnPqfBD.s:36: Error: invalid instruction suffix for `push'
/tmp/ccnPqfBD.s:37: Error: invalid instruction suffix for `push'
/tmp/ccnPqfBD.s:38: Error: invalid instruction suffix for `push'
/tmp/ccnPqfBD.s:50: Error: invalid instruction suffix for `pop'
/tmp/ccnPqfBD.s:66: Error: invalid instruction suffix for `push'
/tmp/ccnPqfBD.s:73: Error: invalid instruction suffix for `push'
/tmp/ccnPqfBD.s:80: Error: invalid instruction suffix for `pop'
/tmp/ccnPqfBD.s:88: Error: invalid instruction suffix for `push'
/tmp/ccnPqfBD.s:92: Error: invalid instruction suffix for `pop'
/tmp/ccnPqfBD.s:103: Error: invalid instruction suffix for `push'
/tmp/ccnPqfBD.s:108: Error: invalid instruction suffix for `push'
/tmp/ccnPqfBD.s:110: Error: invalid instruction suffix for `push'
/tmp/ccnPqfBD.s:112: Error: invalid instruction suffix for `push'
/tmp/ccnPqfBD.s:123: Error: invalid instruction suffix for `pop'
peter@peter-Akoya-E6237:~/Pete/Pascal$
What am I doing wrong? Can you please advise?
--
Peter Williams
petesweet27rr(a)gmail.com
[View Less]