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
* [Bug preprocessor/65387] [4.8/4.9/5 Regression] cpp -C emits extraneous comment header on every file
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 ` rguenth at gcc dot gnu.org
2015-03-11 10:03 ` rguenth at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-03-11 10:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65387
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2015-03-11
CC| |jsm28 at gcc dot gnu.org
Target Milestone|--- |4.8.5
Summary|cpp -C emits extraneous |[4.8/4.9/5 Regression] cpp
|comment header on every |-C emits extraneous comment
|file |header on every file
Ever confirmed|0 |1
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Heh. Does this since 4.8. This is from stdc-predef.h we forcefully include in
each translation unit. You can use -nostdinc to restore original behavior.
Note that this bug will likely be closed as invalid/wontfix. OTOH the included
comment says the file is LGPL which may have issues if it gets included in
sth statically linked? I think we should change its license to BSD/MIT.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug preprocessor/65387] [4.8/4.9/5 Regression] cpp -C emits extraneous comment header on every file
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
3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-03-11 10:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65387
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Oh, in my case stdc-predef.h comes from glibc thus the license comment should
be directed there. The GCC shipped stuff seems to have the runtime exception.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug preprocessor/65387] [4.8/4.9/5 Regression] cpp -C emits extraneous comment header on every file
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
3 siblings, 0 replies; 5+ messages in thread
From: manu at gcc dot gnu.org @ 2015-03-11 15:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65387
Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |manu at gcc dot gnu.org
--- Comment #3 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
https://gcc.gnu.org/gcc-4.8/porting_to.html suggests to use -ffreestanding
Of course, the real fix for this and future issues arising from such mis-use is
to make libcpp more general and enable cpp to have a "Fortran mode" (-x
fortran) or even compile a Fortran version of cpp (fpp?). This would be a very
valuable contribution to GCC and gfortran and, technically, it should be not
very difficult:
https://gcc.gnu.org/wiki/GettingStarted#Basics:_Contributing_to_GCC_in_10_easy_steps
>From gcc-bugs-return-480086-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Mar 11 15:57:06 2015
Return-Path: <gcc-bugs-return-480086-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 24924 invoked by alias); 11 Mar 2015 15:57:06 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 24856 invoked by uid 48); 11 Mar 2015 15:57:02 -0000
From: "doko at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug other/65384] Intel MPX does not support x32
Date: Wed, 11 Mar 2015 15:57:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: other
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: doko at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: enkovich.gnu at gmail dot com
X-Bugzilla-Target-Milestone: 5.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-65384-4-F4hF4iYZYo@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-65384-4@http.gcc.gnu.org/bugzilla/>
References: <bug-65384-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-03/txt/msg01230.txt.bz2
Content-length: 191
https://gcc.gnu.org/bugzilla/show_bug.cgi?ide384
--- Comment #1 from Matthias Klose <doko at gcc dot gnu.org> ---
patch posted at
https://gcc.gnu.org/ml/gcc-patches/2015-03/msg00627.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug preprocessor/65387] [4.8/4.9/5 Regression] cpp -C emits extraneous comment header on every file
2015-03-11 9:53 [Bug preprocessor/65387] New: cpp -C emits extraneous comment header on every file bugs at stellardeath dot org
` (2 preceding siblings ...)
2015-03-11 15:52 ` manu at gcc dot gnu.org
@ 2015-03-11 17:11 ` jakub at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-03-11 17:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65387
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |jakub at gcc dot gnu.org
Resolution|--- |INVALID
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Well, IMHO if you do not want comments or are not prepared to handle them, just
don't use -C.
Fortran these days has integrated preprocessor, I doubt fpp would be of any use
and you'd need to define how exactly should "fortran" preprocessing behave
(e.g. how it is different from assembly preprocessing). Note that even -E
-xassembler-with-cpp preprocessing includes stdc-predef.h by default, you need
to use -nostdinc to avoid that.
In any case, not a bug IMHO.
^ 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).