aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaius Mulley <gaiusmod2@gmail.com>2025-01-25 02:28:13 +0000
committerGaius Mulley <gaiusmod2@gmail.com>2025-01-25 02:28:13 +0000
commitd0acb7b2b26d4f821968043eafd286a1a3a37ca3 (patch)
tree167e7eec8bcf67e4cc05086422fbfe90851145b8
parent80bd9eb48190f3554c4de74ccb3d0976831160b1 (diff)
downloadgcc-d0acb7b2b26d4f821968043eafd286a1a3a37ca3.zip
gcc-d0acb7b2b26d4f821968043eafd286a1a3a37ca3.tar.gz
gcc-d0acb7b2b26d4f821968043eafd286a1a3a37ca3.tar.bz2
PR modula2/118010 m2 libc lseek procedure interface correction
This patch corrects a typo in the definition of lseek in libc. The second offset parameter should have been declared as COFF_T. No errors are seen when bootstrapping using -Werror=odr -Werror=lto-type-mismatch. gcc/m2/ChangeLog: PR modula2/118010 * gm2-compiler/P2SymBuild.mod (Debug): Comment out unused procedure. * gm2-libs/libc.def (lseek): Declare second parameter offset as COFF_T. Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
-rw-r--r--gcc/m2/gm2-compiler/P2SymBuild.mod2
-rw-r--r--gcc/m2/gm2-libs/libc.def2
2 files changed, 3 insertions, 1 deletions
diff --git a/gcc/m2/gm2-compiler/P2SymBuild.mod b/gcc/m2/gm2-compiler/P2SymBuild.mod
index 1b59f3d..8f3b499 100644
--- a/gcc/m2/gm2-compiler/P2SymBuild.mod
+++ b/gcc/m2/gm2-compiler/P2SymBuild.mod
@@ -182,6 +182,7 @@ PROCEDURE stop ; BEGIN END stop ;
Debug - call stop if symbol name is name.
*)
+(*
PROCEDURE Debug (tok: CARDINAL; sym: CARDINAL; name: ARRAY OF CHAR) ;
BEGIN
IF MakeKey (name) = GetSymName (sym)
@@ -190,6 +191,7 @@ BEGIN
END ;
MetaErrorT1 (tok, 'procedure {%1Wa}', sym)
END Debug ;
+*)
(*
diff --git a/gcc/m2/gm2-libs/libc.def b/gcc/m2/gm2-libs/libc.def
index f1f13dd..525d016 100644
--- a/gcc/m2/gm2-libs/libc.def
+++ b/gcc/m2/gm2-libs/libc.def
@@ -311,7 +311,7 @@ PROCEDURE creat (filename: ADDRESS; mode: CARDINAL) : INTEGER;
off_t lseek(int fildes, off_t offset, int whence);
*)
-PROCEDURE lseek (fd: INTEGER; offset: CSSIZE_T; whence: INTEGER) : [ COFF_T ] ;
+PROCEDURE lseek (fd: INTEGER; offset: COFF_T; whence: INTEGER) : [ COFF_T ] ;
(*