public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug preprocessor/65387] New: cpp -C emits extraneous comment header on every file
@ 2015-03-11  9:53 bugs at stellardeath dot org
  2015-03-11 10:00 ` [Bug preprocessor/65387] [4.8/4.9/5 Regression] " rguenth at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: bugs at stellardeath dot org @ 2015-03-11  9:53 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 65387
           Summary: cpp -C emits extraneous comment header on every file
           Product: gcc
           Version: 4.9.2
            Status: UNCONFIRMED
          Severity: trivial
          Priority: P3
         Component: preprocessor
          Assignee: unassigned at gcc dot gnu.org
          Reporter: bugs at stellardeath dot org

cpp is often (mis)used for non-C files, many Fortran projects for example
prefer to run a separate preprocessor step by invoking cpp by hand instead of
relying on the built-in preprocessing of the fortran compiler (don't ask why -
I don't understand it either).

In order not to mess up anything in the non-C file, cpp is usually invoked as

  cpp -C -P -traditional

The "-C" flag started to make problems in recent versions(?), as this now emits
a large comment header on every file:

#> echo "asd" | cpp -C -P
/* Copyright (C) 1991-2015 Free Software Foundation, Inc.
   This file is part of the GNU C Library.

   The GNU C Library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public
   License as published by the Free Software Foundation; either
   version 2.1 of the License, or (at your option) any later version.

   The GNU C Library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Lesser General Public License for more details.

   You should have received a copy of the GNU Lesser General Public
   License along with the GNU C Library; if not, see
   <http://www.gnu.org/licenses/>.  */
/* This header is separate from features.h so that the compiler can
   include it implicitly at the start of every compilation.  It must
   not itself include <features.h> or any other header that includes
   <features.h> because the implicit include comes before any feature
   test macros that may be defined in a source file before it first
   explicitly includes a system header.  GCC knows the name of this
   header in order to preinclude it.  */
/* glibc's intent is to support the IEC 559 math functionality, real
   and complex.  If the GCC (4.9 and later) predefined macros
   specifying compiler intent are available, use them to determine
   whether the overall intent is to support these features; otherwise,
   presume an older compiler has intent to support these features and
   define these macros by default.  */
/* wchar_t uses ISO/IEC 10646 (2nd ed., published 2011-03-15) /
   Unicode 6.0.  */
/* We do not support C11 <threads.h>.  */
asd


Would it be too much trouble to not include this extraneous header?

Kind regards,
  Lorenz


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

end of thread, other threads:[~2015-03-11 17:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-11  9:53 [Bug preprocessor/65387] New: cpp -C emits extraneous comment header on every file bugs at stellardeath dot org
2015-03-11 10:00 ` [Bug preprocessor/65387] [4.8/4.9/5 Regression] " rguenth at gcc dot gnu.org
2015-03-11 10:03 ` rguenth at gcc dot gnu.org
2015-03-11 15:52 ` manu at gcc dot gnu.org
2015-03-11 17:11 ` jakub 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).