public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/28662]  New: fpp call of gfortran: -traditional-cpp versus newer macros like #x
@ 2006-08-09 14:04 tobias dot burnus at physik dot fu-berlin dot de
  2006-08-09 18:03 ` [Bug fortran/28662] " pinskia at gcc dot gnu dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 13+ messages in thread
From: tobias dot burnus at physik dot fu-berlin dot de @ 2006-08-09 14:04 UTC (permalink / raw)
  To: gcc-bugs

See http://gcc.gnu.org/ml/fortran/2006-08/msg00145.html

Currently gfortran calls cpp with the option -traditional-cpp. Using this
option, newer macros like
   #define msg(x) print *, #x
don't work (the #x causes the argument to be quoted). (See url/email for
example.)

I couldn't find any standard for fpp. I assume that it is only a Fortran-aware
CPP, which is defined in the C99 standard (ISO/IEC 9899:1999, section "6.10.3.2
The # operator").

I would expect that the newer constructs work by default with gfortran, or at
least that one can force that mode. The first would simply mean to remove
"-traditional-cpp" from the argument list.

Other compilers: Sun Studio f95 and Intel Fortran Compiler both support #x by
default.

g95 and NAGware f95 seem to work as gfortran: msg(test) is converted into
  print *,#hello


-- 
           Summary: fpp call of gfortran: -traditional-cpp versus newer
                    macros like #x
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tobias dot burnus at physik dot fu-berlin dot de


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


^ permalink raw reply	[flat|nested] 13+ messages in thread
[parent not found: <bug-28662-4@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2021-08-27  2:15 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-09 14:04 [Bug fortran/28662] New: fpp call of gfortran: -traditional-cpp versus newer macros like #x tobias dot burnus at physik dot fu-berlin dot de
2006-08-09 18:03 ` [Bug fortran/28662] " pinskia at gcc dot gnu dot org
2006-08-09 18:10 ` tobias dot burnus at physik dot fu-berlin dot de
2006-10-31 13:03 ` burnus at gcc dot gnu dot org
2008-02-08 17:55 ` burnus at gcc dot gnu dot org
2008-04-23 19:30 ` burnus at gcc dot gnu dot org
2008-07-30 18:08 ` burnus at gcc dot gnu dot org
2008-08-06  6:25 ` burnus at gcc dot gnu dot org
2008-08-06  6:27 ` burnus at gcc dot gnu dot org
     [not found] <bug-28662-4@http.gcc.gnu.org/bugzilla/>
2012-03-03 14:37 ` fxcoudert at gcc dot gnu.org
2014-12-11 16:21 ` burnus at gcc dot gnu.org
2015-08-30 14:37 ` dominiq at lps dot ens.fr
2021-08-27  2:15 ` pinskia 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).