public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug modula2/114520] Incorrect ordering of import/export statements cause confusing error messages
Date: Thu, 28 Mar 2024 16:50:50 +0000	[thread overview]
Message-ID: <bug-114520-4-r4oJBBbAOi@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-114520-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114520

--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Gaius Mulley <gaius@gcc.gnu.org>:

https://gcc.gnu.org/g:aeee63ffbf4f4fbc4d90d8aae808d6b67f0148a3

commit r14-9710-gaeee63ffbf4f4fbc4d90d8aae808d6b67f0148a3
Author: Gaius Mulley <gaiusmod2@gmail.com>
Date:   Thu Mar 28 16:49:44 2024 +0000

    PR modula2/114520 Incorrect ordering of import/export statements cause
confusion

    The error recovery causes misleading error messages to appear if an
    EXPORT and IMPORT statement are in the wrong order.  This patch
    detects the incorrect order and issues an error message and prevents
    error recovery.  The fix should be improved and made more general if
    another similar case is required.

    gcc/m2/ChangeLog:

            PR modula2/114520
            * gm2-compiler/P0SyntaxCheck.bnf (DetectImport): New
            procedure.
            (EnableImportCheck): New boolean.
            (Expect): Call DetectImport.
            (Export): Set EnableImportCheck TRUE before ';' and FALSE
            afterwards.

    Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>

  parent reply	other threads:[~2024-03-28 16:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-28 15:46 [Bug modula2/114520] New: " gaius at gcc dot gnu.org
2024-03-28 15:46 ` [Bug modula2/114520] " gaius at gcc dot gnu.org
2024-03-28 16:25 ` gaius at gcc dot gnu.org
2024-03-28 16:29 ` gaius at gcc dot gnu.org
2024-03-28 16:50 ` cvs-commit at gcc dot gnu.org [this message]
2024-03-28 16:52 ` gaius at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-114520-4-r4oJBBbAOi@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).