public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "slayoo at staszic dot waw.pl" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/53077] New: suggestion to add the .f extension to the list of file extensions that trigger enabling of the preprocessor
Date: Sun, 22 Apr 2012 20:34:00 -0000	[thread overview]
Message-ID: <bug-53077-4@http.gcc.gnu.org/bugzilla/> (raw)

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53077

             Bug #: 53077
           Summary: suggestion to add the .f extension to the list of file
                    extensions that trigger enabling of the preprocessor
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: slayoo@staszic.waw.pl


Hello,


$ cat test.f
#define print(x) print*, x
program test
  print('aqq')
end
$ gfortran -ffree-form test.f
Warning: test.f:1: Illegal preprocessor directive
test.f:3.8:

  print('aqq')
        1
Error: Missing leading left parenthesis in format string at (1)
$ mv test.f test.F
$ gfortran-mp-4.6 -ffree-form test.F && echo OK
OK



This behavior is consistent with the docs but it's quite misleading, especially
as the warning message might be understood as if there was something wrong
within the macro definition, and not with the fact that the macro is there at
all.

Why not turning on the preprocessor with .f extensions as well? 
(currently only the .F extension turns it on by default)

HTH,
Sylwester


             reply	other threads:[~2012-04-22 20:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-22 20:34 slayoo at staszic dot waw.pl [this message]
2012-04-22 20:36 ` [Bug fortran/53077] " slayoo at staszic dot waw.pl
2012-04-22 21:36 ` slayoo at staszic dot waw.pl
2012-04-23  1:17 ` pinskia at gcc dot gnu.org
2012-04-23  8:27 ` burnus at gcc dot gnu.org
2012-04-23 11:13 ` slayoo at staszic dot waw.pl
2014-02-08 14:54 ` [Bug fortran/53077] replace "Illegal preprocessor directive" message with "Ignoring preprocessor directive at %C. Use -cpp to enable the C preprocessor" (a patch by Tobias included) dominiq at lps dot ens.fr
2020-04-12 16:33 ` dominiq at lps dot ens.fr

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-53077-4@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).