public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/modula-2] Bug fix for error scope announcement and update git info in doc/gm2.texi.
@ 2021-11-19 15:14 Gaius Mulley
  0 siblings, 0 replies; only message in thread
From: Gaius Mulley @ 2021-11-19 15:14 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:016519cc0efd48efeeaefb7736f960a1b55cd604

commit 016519cc0efd48efeeaefb7736f960a1b55cd604
Author: Gaius Mulley <gaius.mulley@southwales.ac.uk>
Date:   Fri Nov 19 15:14:18 2021 +0000

    Bug fix for error scope announcement and update git info in doc/gm2.texi.
    
    2021-11-19  Gaius Mulley  <gaius.mulley@southwales.ac.uk>
    
    gcc/ChangeLog:
    
            * doc/gm2.texi: Updated the git url and git instructions.
            * gdbinit.in: Revert all Modula-2 debugging configuration.
    
    gcc/m2/ChangeLog:
    
            * gm2-compiler/M2Error.mod (ChainError): Initialize scopeKind and
            scopeName.
            * gm2-compiler/M2Range.mod (CodeErrorCheckLoc): Added comment.
    
    Signed-off-by: Gaius Mulley <gaius.mulley@southwales.ac.uk>

Diff:
---
 gcc/doc/gm2.texi                | 37 +++++--------------------------------
 gcc/gdbinit.in                  |  8 --------
 gcc/m2/gm2-compiler/M2Error.mod | 21 ++++++++++++---------
 gcc/m2/gm2-compiler/M2Range.mod |  4 +++-
 4 files changed, 20 insertions(+), 50 deletions(-)

diff --git a/gcc/doc/gm2.texi b/gcc/doc/gm2.texi
index 9aca899d21c..56b2ba0d600 100644
--- a/gcc/doc/gm2.texi
+++ b/gcc/doc/gm2.texi
@@ -251,43 +251,16 @@ was released on December 11 2010.
 @section How to get source code using git
 
 GNU Modula-2 is in the process of migrating into the
-@url{https://gcc.gnu.org/git.html, GCC git tree}.  At the time of
-writing this has not completed and therefore the previous two
-repositories can be used to retrieve gm2.
-
-There are two other repositories containing gm2, one on Savannah which
-only contains the Modula-2 front end and one on
-@url{http://floppsie.comp.glam.ac.uk, floppsie} which contains a gcc
-repository with a rebased gm2 applied.  The floppsie repository is
-automatically generated from the gcc repository and the Savannah
-repository.  In effect the floppsie repository rebases gm2 to the gcc
-repository for all supported branches.  At the time of writing all
-developer git pushes are still directed to the Savannah repository
-(although this is about to change).
-
-The combined git repository can be obtained using the following
-commands:
+@url{https://gcc.gnu.org/git.html, GCC git tree}.  The development
+branch is available via git:
 
 @example
-$ git clone http://floppsie.comp.glam.ac.uk/gm2 gm2-floppsie
-$ cd gm2-floppsie
-$ git checkout gm2-master
+$ git clone git://gcc.gnu.org/git/gcc.git gcc-git-devel-modula2
+$ cd gcc-git-devel-modula2
+$ git checkout devel/modula-2
 $ cd ..
 @end example
 
-If you only need the gm2 front end then this can be obtained from
-Savannah using the commands:
-
-@example
-$ git clone https://git.savannah.nongnu.org/git/gm2.git gm2-savannah
-$ cd gm2-savannah
-$ git checkout master
-$ cd ..
-@end example
-
-The source code in the git repository on Savannah can be
-@uref{http://git.savannah.gnu.org/cgit/gm2.git/tree, browsed}.
-
 @node Obtaining, Features, Development, Using
 
 GNU Modula-2 is in the process of migrating into the
diff --git a/gcc/gdbinit.in b/gcc/gdbinit.in
index be57b04933c..7d7c2be2297 100644
--- a/gcc/gdbinit.in
+++ b/gcc/gdbinit.in
@@ -383,11 +383,3 @@ skip JUMP_LABEL_AS_INSN
 
 # Restore pagination to the previous state.
 python if __gcc_prev_pagination: gdb.execute("set pagination on")
-
-break lhd_print_error_function
-# run $HOME/Sandpit/chisel/m2/foo.mod
-# run -fq -I/home/gaius/GM2/graft-combine/build-devel-modula2-enabled/x86_64-pc-linux-gnu/./libgm2/libm2pim:/home/gaius/GM2/graft-combine/gcc-git-devel-modula2/gcc/testsuite/../m2/gm2-libs -I/home/gaius/GM2/graft-combine/build-devel-modula2-enabled/x86_64-pc-linux-gnu/./libgm2/libm2iso:/home/gaius/GM2/graft-combine/gcc-git-devel-modula2/gcc/testsuite/../m2/gm2-libs-iso -I/home/gaius/GM2/graft-combine/gcc-git-devel-modula2/gcc/testsuite/gm2/extensions/pass -fpim -fno-diagnostics-show-caret -fno-diagnostics-show-line-numbers -fdiagnostics-color=never    -O /home/gaius/GM2/graft-combine/gcc-git-devel-modula2/gcc/testsuite/gm2/extensions/run/pass/align4.mod
-#
-#
-break M2Error_NewError
-run -g -fm2-g -Wunused-variable -fsoft-check-all -g -fm2-g  -funbounded-by-reference -fpim -fextended-opaque -Wpedantic-cast -Wpedantic-param-names -ffunction-sections -fdata-sections  -I/home/gaius/GM2/graft-combine/gcc-git-devel-modula2/gcc/m2/gm2-compiler -I/home/gaius/GM2/graft-combine/gcc-git-devel-modula2/gcc/m2/gm2-libs -I/home/gaius/GM2/graft-combine/gcc-git-devel-modula2/gcc/m2/gm2-gcc -I/home/gaius/GM2/graft-combine/gcc-git-devel-modula2/gcc/m2/gm2-libiberty /home/gaius/GM2/graft-combine/gcc-git-devel-modula2/gcc/testsuite/gm2/pim/pass/program2.mod -o -
\ No newline at end of file
diff --git a/gcc/m2/gm2-compiler/M2Error.mod b/gcc/m2/gm2-compiler/M2Error.mod
index 7dd6fa87869..f1f39b3e7ad 100644
--- a/gcc/m2/gm2-compiler/M2Error.mod
+++ b/gcc/m2/gm2-compiler/M2Error.mod
@@ -403,6 +403,7 @@ BEGIN
       fatal  := TRUE ;
       color  := FALSE ;
    END ;
+   Assert (scopeKind # noscope) ;
    e^.scopeKind := scopeKind ;
    e^.scopeName := scopeName ;
    IF (head=NIL) OR (head^.token>AtTokenNo)
@@ -465,20 +466,22 @@ VAR
 BEGIN
    IF e=NIL
    THEN
-      RETURN( NewError(AtTokenNo) )
+      RETURN NewError (AtTokenNo)
    ELSE
-      NEW(f) ;
+      NEW (f) ;
       WITH f^ DO
-         s      := NIL ;
-         token  := AtTokenNo ;
-         next   := e^.child ;
-         parent := e ;
-         child  := NIL ;
-         fatal  := e^.fatal
+         s         := NIL ;
+         token     := AtTokenNo ;
+         next      := e^.child ;
+         parent    := e ;
+         child     := NIL ;
+         fatal     := e^.fatal ;
+         scopeKind := e^.scopeKind ;
+         scopeName := e^.scopeName
       END ;
       e^.child := f
    END ;
-   RETURN( f )
+   RETURN f
 END ChainError ;
 
 
diff --git a/gcc/m2/gm2-compiler/M2Range.mod b/gcc/m2/gm2-compiler/M2Range.mod
index 0f9675f9bbb..308bdcc2705 100644
--- a/gcc/m2/gm2-compiler/M2Range.mod
+++ b/gcc/m2/gm2-compiler/M2Range.mod
@@ -2296,7 +2296,9 @@ END IssueWarning ;
 
 
 (*
-   CodeErrorCheckLoc -
+   CodeErrorCheckLoc - generate a runtime error message positioned at location
+                       and in function.  If function is NIL then the error scope
+                       is used.
 *)
 
 PROCEDURE CodeErrorCheckLoc (location: location_t;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-11-19 15:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-19 15:14 [gcc/devel/modula-2] Bug fix for error scope announcement and update git info in doc/gm2.texi Gaius Mulley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).