public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug modula2/114648] New: compiler by default does not handle C pre-processor file and line directives
@ 2024-04-09  0:15 gaius at gcc dot gnu.org
  2024-04-09  0:15 ` [Bug modula2/114648] " gaius at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: gaius at gcc dot gnu.org @ 2024-04-09  0:15 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 114648
           Summary: compiler by default does not handle C pre-processor
                    file and line directives
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: modula2
          Assignee: gaius at gcc dot gnu.org
          Reporter: gaius at gcc dot gnu.org
  Target Milestone: ---

The compiler currently rejects C preprocessor file and line directives which is
a mismatch from the description in the documentation.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug modula2/114648] compiler by default does not handle C pre-processor file and line directives
  2024-04-09  0:15 [Bug modula2/114648] New: compiler by default does not handle C pre-processor file and line directives gaius at gcc dot gnu.org
@ 2024-04-09  0:15 ` gaius at gcc dot gnu.org
  2024-04-09  0:19 ` pinskia at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: gaius at gcc dot gnu.org @ 2024-04-09  0:15 UTC (permalink / raw)
  To: gcc-bugs

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

Gaius Mulley <gaius at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2024-04-09
             Status|UNCONFIRMED                 |ASSIGNED

--- Comment #1 from Gaius Mulley <gaius at gcc dot gnu.org> ---
Confirmed.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug modula2/114648] compiler by default does not handle C pre-processor file and line directives
  2024-04-09  0:15 [Bug modula2/114648] New: compiler by default does not handle C pre-processor file and line directives gaius at gcc dot gnu.org
  2024-04-09  0:15 ` [Bug modula2/114648] " gaius at gcc dot gnu.org
@ 2024-04-09  0:19 ` pinskia at gcc dot gnu.org
  2024-04-09  0:57 ` gaius at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-04-09  0:19 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |rejects-valid

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Which ones are we talking about, the GNU extension `# LINE "FILE" ...` or the
`#line LINE "FILE"` version? Or both?

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug modula2/114648] compiler by default does not handle C pre-processor file and line directives
  2024-04-09  0:15 [Bug modula2/114648] New: compiler by default does not handle C pre-processor file and line directives gaius at gcc dot gnu.org
  2024-04-09  0:15 ` [Bug modula2/114648] " gaius at gcc dot gnu.org
  2024-04-09  0:19 ` pinskia at gcc dot gnu.org
@ 2024-04-09  0:57 ` gaius at gcc dot gnu.org
  2024-04-09  1:33 ` gaius at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: gaius at gcc dot gnu.org @ 2024-04-09  0:57 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Gaius Mulley <gaius at gcc dot gnu.org> ---
it will handle both, implemented in:  gcc/m2/m2.flex:171
but the default was inverted during a recent bugfix.
The particular test code example which provoked the bug was:

# 2 "AdvParse.bnf"
IMPLEMENTATION MODULE AdvParse ;

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug modula2/114648] compiler by default does not handle C pre-processor file and line directives
  2024-04-09  0:15 [Bug modula2/114648] New: compiler by default does not handle C pre-processor file and line directives gaius at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2024-04-09  0:57 ` gaius at gcc dot gnu.org
@ 2024-04-09  1:33 ` gaius at gcc dot gnu.org
  2024-04-09  1:40 ` cvs-commit at gcc dot gnu.org
  2024-04-09  1:40 ` gaius at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: gaius at gcc dot gnu.org @ 2024-04-09  1:33 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Gaius Mulley <gaius at gcc dot gnu.org> ---
Created attachment 57907
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57907&action=edit
Proposed fix

Trivial patch fix proposed with test code.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug modula2/114648] compiler by default does not handle C pre-processor file and line directives
  2024-04-09  0:15 [Bug modula2/114648] New: compiler by default does not handle C pre-processor file and line directives gaius at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2024-04-09  1:33 ` gaius at gcc dot gnu.org
@ 2024-04-09  1:40 ` cvs-commit at gcc dot gnu.org
  2024-04-09  1:40 ` gaius at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-04-09  1:40 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 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:600bf396799a022e65938de572ad1a79a951b95a

commit r14-9849-g600bf396799a022e65938de572ad1a79a951b95a
Author: Gaius Mulley <gaiusmod2@gmail.com>
Date:   Tue Apr 9 02:35:11 2024 +0100

    PR modula2/114648 cc1gm2 by default does not handle C pre-processor file
and line directives

    This patch fixes the default behavior of cc1gm2 to the description in
    the documentation.  By default cc1gm2 will allow C preprocessor
    directives (they can be turned off via -fno-cpp).

    gcc/m2/ChangeLog:

            PR modula2/114648
            * gm2-compiler/M2Options.mod (LineDirectives): Initially
            set to true.

    gcc/testsuite/ChangeLog:

            PR modula2/114648
            * gm2/cpp/default/pass/AdvParse.def: New test.
            * gm2/cpp/default/pass/AdvParse.mod: New test.
            * gm2/cpp/default/pass/cpp-default-pass.exp: New test.

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug modula2/114648] compiler by default does not handle C pre-processor file and line directives
  2024-04-09  0:15 [Bug modula2/114648] New: compiler by default does not handle C pre-processor file and line directives gaius at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2024-04-09  1:40 ` cvs-commit at gcc dot gnu.org
@ 2024-04-09  1:40 ` gaius at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: gaius at gcc dot gnu.org @ 2024-04-09  1:40 UTC (permalink / raw)
  To: gcc-bugs

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

Gaius Mulley <gaius at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #6 from Gaius Mulley <gaius at gcc dot gnu.org> ---
Closing now the patch has been applied.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-04-09  1:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-09  0:15 [Bug modula2/114648] New: compiler by default does not handle C pre-processor file and line directives gaius at gcc dot gnu.org
2024-04-09  0:15 ` [Bug modula2/114648] " gaius at gcc dot gnu.org
2024-04-09  0:19 ` pinskia at gcc dot gnu.org
2024-04-09  0:57 ` gaius at gcc dot gnu.org
2024-04-09  1:33 ` gaius at gcc dot gnu.org
2024-04-09  1:40 ` cvs-commit at gcc dot gnu.org
2024-04-09  1:40 ` gaius at gcc dot gnu.org

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).