https://gcc.gnu.org/g:0cdb99242ce1429d432989a3a16970f16a949bfc

commit r17-6067-g0cdb99242ce1429d432989a3a16970f16a949bfc
Author: Gaius Mulley <[email protected]>
Date:   Mon Nov 9 16:37:48 2026 +0000

    modula2: Tidyup remove unused source files and directory gm2-ici
    
    This tidyup patch removes the directory gm2-ici which is unused.
    
    gcc/m2/ChangeLog:
    
            * gm2-ici/M2Emit.mod: Removed.
            * gm2-ici/README: Removed.
            * gm2-ici/m2linemap.c: Removed.
    
    Signed-off-by: Gaius Mulley <[email protected]>

Diff:
---
 gcc/m2/gm2-ici/M2Emit.mod  | 179 ---------------------------------------------
 gcc/m2/gm2-ici/README      |   3 -
 gcc/m2/gm2-ici/m2linemap.c |  38 ----------
 3 files changed, 220 deletions(-)

diff --git a/gcc/m2/gm2-ici/M2Emit.mod b/gcc/m2/gm2-ici/M2Emit.mod
deleted file mode 100644
index 85e886ee3102..000000000000
--- a/gcc/m2/gm2-ici/M2Emit.mod
+++ /dev/null
@@ -1,179 +0,0 @@
-(* M2Emit.mod issue errors to the gm2 tools substructure.
-
-Copyright (C) 2019-2026 Free Software Foundation, Inc.
-Contributed by Gaius Mulley <[email protected]>.
-
-This file is part of GNU Modula-2.
-
-GNU Modula-2 is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 3, or (at your option)
-any later version.
-
-GNU Modula-2 is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GNU Modula-2; see the file COPYING3.  If not see
-<http://www.gnu.org/licenses/>.  *)
-
-IMPLEMENTATION MODULE M2Emit ;
-
-FROM M2ColorString IMPORT filenameColor, endColor, errorColor, warningColor, 
noteColor,
-                          range1Color, range2Color ;
-
-FROM M2LexBuf IMPORT FindFileNameFromToken, TokenToLineNo, TokenToColumnNo, 
GetTokenNo,
-                     UnknownTokenNo, BuiltinTokenNo;
-
-FROM DynamicStrings IMPORT String, InitString, InitStringCharStar, ConCat, 
ConCatChar, Mark, string, KillString, Dup ;
-
-FROM ASCII IMPORT nul, nl ;
-FROM FormatStrings IMPORT Sprintf0, Sprintf1, Sprintf2, Sprintf3 ;
-FROM FIO IMPORT StdOut, WriteNBytes, Close, FlushBuffer ;
-FROM M2Printf IMPORT printf0, printf1, printf2 ;
-FROM M2Options IMPORT Xcode ;
-FROM StrLib IMPORT StrLen ;
-FROM libc IMPORT abort ;
-
-IMPORT StdIO, StrIO ;
-
-CONST
-   Debugging  =  TRUE ;
-
-
-
-(*
-   EmitError - pass the error to GCC.
-*)
-
-PROCEDURE EmitError (error, note: BOOLEAN; token: CARDINAL; message: String) ;
-BEGIN
-   IF error
-   THEN
-      message := ConCat (errorColor (InitString (' error ')), endColor 
(message))
-   ELSIF note
-   THEN
-      message := ConCat (noteColor (InitString (' note ')), endColor (message))
-   ELSE
-      message := ConCat (warningColor (InitString (' warning ')), endColor 
(message))
-   END ;
-   OutString (FindFileNameFromToken (token, 0),
-              TokenToLineNo (token, 0), TokenToColumnNo (token, 0), message)
-END EmitError ;
-
-
-(*
-   OutString - writes the contents of String to stdout.
-               The string, s, is destroyed.
-*)
-
-PROCEDURE OutString (file: String; line, col: CARDINAL; s: String) ;
-VAR
-   leader : String ;
-   p, q   : POINTER TO CHAR ;
-   space,
-   newline: BOOLEAN ;
-BEGIN
-   file := ConCat(filenameColor(InitString('')), file) ;
-   file := endColor(file) ;
-   INC(col) ;
-   leader := ConCatChar(file, ':') ;
-   leader := range1Color(leader) ;
-   leader := ConCat(leader, Sprintf1(Mark(InitString('%d')), line)) ;
-   leader := endColor(leader) ;
-   leader := ConCatChar(leader, ':') ;
-   IF NOT Xcode
-   THEN
-      leader := range2Color(leader) ;
-      leader := ConCat(leader, Sprintf1(Mark(InitString('%d')), col)) ;
-      leader := endColor(leader) ;
-      leader := ConCatChar(leader, ':')
-   END ;
-   p := string(s) ;
-   newline := TRUE ;
-   space := FALSE ;
-   WHILE (p#NIL) AND (p^#nul) DO
-      IF newline
-      THEN
-         q := string(leader) ;
-         WHILE (q#NIL) AND (q^#nul) DO
-            StdIO.Write(q^) ;
-            INC(q)
-         END
-      END ;
-      newline := (p^=nl) ;
-      space := (p^=' ') ;
-      IF newline AND Xcode
-      THEN
-         printf1('(pos: %d)', col)
-      END ;
-      StdIO.Write(p^) ;
-      INC(p)
-   END ;
-   IF NOT newline
-   THEN
-      IF Xcode
-      THEN
-         IF NOT space
-         THEN
-            StdIO.Write(' ')
-         END ;
-         printf1('(pos: %d)', col)
-      END ;
-      StdIO.Write(nl)
-   END ;
-   FlushBuffer(StdOut) ;
-   IF NOT Debugging
-   THEN
-      s      := KillString(s) ;
-      leader := KillString(leader)
-   END
-END OutString ;
-
-
-(*
-   InternalError -
-*)
-
-PROCEDURE InternalError (message: ARRAY OF CHAR) ;
-VAR
-   i, h: CARDINAL ;
-BEGIN
-   StrIO.WriteString ('internal error: ') ;
-   h := StrLen (message) ;
-   i := 0 ;
-   WHILE i<h DO
-      StdIO.Write (message[i]) ;
-      INC (i)
-   END ;
-   StdIO.Write(nl) ;
-   FlushBuffer(StdOut) ;
-   abort
-END InternalError ;
-
-
-(*
-   UnknownLocation - return the unknown location (using GCC linemap for cc1gm2)
-                     and constants for gm2l and gm2m.
-*)
-
-PROCEDURE UnknownLocation () : location_t ;
-BEGIN
-   RETURN UnknownTokenNo
-END UnknownLocation ;
-
-
-(*
-   BuiltinsLocation - return the builtins location (using GCC linemap for 
cc1gm2)
-                      and constants for gm2l and gm2m.
-*)
-
-PROCEDURE BuiltinsLocation () : location_t ;
-BEGIN
-   RETURN BuiltinTokenNo
-END BuiltinsLocation ;
-
-
-END M2Emit.
diff --git a/gcc/m2/gm2-ici/README b/gcc/m2/gm2-ici/README
deleted file mode 100644
index 2b9fef0aca98..000000000000
--- a/gcc/m2/gm2-ici/README
+++ /dev/null
@@ -1,3 +0,0 @@
-This subdirectory contains modules which provide a dummy internal
-compatibility interface to enable m2 tools (gm2l, gm2lgen, gm2lcc,
-gm2lorder, gm2m) to share modules with the cc1gm2 compiler.
\ No newline at end of file
diff --git a/gcc/m2/gm2-ici/m2linemap.c b/gcc/m2/gm2-ici/m2linemap.c
deleted file mode 100644
index 20445920dcfb..000000000000
--- a/gcc/m2/gm2-ici/m2linemap.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/* m2linemap.c dummy module to allow tools to linking with M2LexBuf.
-
-Copyright (C) 2005-2026 Free Software Foundation, Inc.
-Contributed by Gaius Mulley <[email protected]>.
-
-This file is part of GNU Modula-2.
-
-GNU Modula-2 is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 3, or (at your option)
-any later version.
-
-GNU Modula-2 is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GNU Modula-2; see the file COPYING3.  If not see
-<http://www.gnu.org/licenses/>.  */
-
-#include "config.h"
-#include "system.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void
-m2linemap_GetLocationBinary (void)
-{
-  fprintf (stderr, "GetLocationBinary should not be called\n");
-  exit (1);
-}
-
-#ifdef __cplusplus
-}
-#endif

Reply via email to