public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/64517] New: Inconsistent behavior when mixing -E and -M
@ 2015-01-07  3:25 thfanning at gmail dot com
  2015-01-07  3:29 ` [Bug fortran/64517] " thfanning at gmail dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: thfanning at gmail dot com @ 2015-01-07  3:25 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 64517
           Summary: Inconsistent behavior when mixing -E and -M
           Product: gcc
           Version: 4.9.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: thfanning at gmail dot com

According to documentation, "Passing -M to the driver implies -E". However an
explicit `-E` produces different behavior.

  touch test.F90
  gfortran -M test.F90

produces:

  test.o: test.F90

However,

  gfortran -E -M test.F90

produces

  # 1 "test.F90"
  # 1 "<built-in>"
  # 1 "<command-line>"
  # 1 "test.F90"

  test.o: test.F90

As a result, preprocessor output is mixed with dependency output. A kludge is
to add `-o /dev/null`, but that is ugly.

The description for `-E` states: "The output is in the form of preprocessed
source code, which is sent to the standard output." But shouldn't `-M` change
*what* is sent to stdout?


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

end of thread, other threads:[~2015-01-10  6:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-07  3:25 [Bug fortran/64517] New: Inconsistent behavior when mixing -E and -M thfanning at gmail dot com
2015-01-07  3:29 ` [Bug fortran/64517] " thfanning at gmail dot com
2015-01-09 11:03 ` [Bug preprocessor/64517] " dominiq at lps dot ens.fr
2015-01-10  6:34 ` thfanning at gmail dot com

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