public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug preprocessor/55115] New: [>=4.5.0 regression] missing headers as fatal breaks cproto logic
@ 2012-10-29 11:59 pierre.poissinger at gmail dot com
  2012-10-29 12:54 ` [Bug preprocessor/55115] " manu at gcc dot gnu.org
                   ` (17 more replies)
  0 siblings, 18 replies; 19+ messages in thread
From: pierre.poissinger at gmail dot com @ 2012-10-29 11:59 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 55115
           Summary: [>=4.5.0 regression] missing headers as fatal breaks
                    cproto logic
    Classification: Unclassified
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: preprocessor
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: pierre.poissinger@gmail.com


Fix of 15638 results in the following regression in cproto:

cproto tool is used to auto generate header files by using gcc '-E'.

OR now, GCC >=4.5 treats missing headers as fatal, prepro now stopped and
cproto is now unable to generate prototypes for the source files that do
include these generated header file...

Maybe an option to ignore missing headers should probably be introduced for
prepro ?
(Or already exists but i didn't see it ?)


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

* [Bug preprocessor/55115] [>=4.5.0 regression] missing headers as fatal breaks cproto logic
  2012-10-29 11:59 [Bug preprocessor/55115] New: [>=4.5.0 regression] missing headers as fatal breaks cproto logic pierre.poissinger at gmail dot com
@ 2012-10-29 12:54 ` manu at gcc dot gnu.org
  2012-10-29 14:30 ` redi at gcc dot gnu.org
                   ` (16 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: manu at gcc dot gnu.org @ 2012-10-29 12:54 UTC (permalink / raw)
  To: gcc-bugs


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

Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2012-10-29
                 CC|                            |manu at gcc dot gnu.org
     Ever Confirmed|0                           |1

--- Comment #1 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2012-10-29 12:54:28 UTC ---
If the headers do nothing, just delete them? If the headers do something, how
can you preprocess the file without the info from the headers?

Please, explain why you think you need to preprocess a file ignoring missing
headers, and you cannot do this simply by removing the headers before
preprocessing.

GCC has too many options, we should be cautious before adding more.


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

* [Bug preprocessor/55115] [>=4.5.0 regression] missing headers as fatal breaks cproto logic
  2012-10-29 11:59 [Bug preprocessor/55115] New: [>=4.5.0 regression] missing headers as fatal breaks cproto logic pierre.poissinger at gmail dot com
  2012-10-29 12:54 ` [Bug preprocessor/55115] " manu at gcc dot gnu.org
@ 2012-10-29 14:30 ` redi at gcc dot gnu.org
  2012-10-29 14:43 ` pierre.poissinger at gmail dot com
                   ` (15 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: redi at gcc dot gnu.org @ 2012-10-29 14:30 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-10-29 14:29:44 UTC ---
(In reply to comment #1)
> If the headers do nothing, just delete them? If the headers do something, how
> can you preprocess the file without the info from the headers?

That won't work, I believe cproto parses the errors produced by GCC and figures
out which declarations are missing based on the errors, then creates a header
containing those declarations.

Adding an option just for cproto is definitely not a good idea, just fix cproto
instead.  The right answer seems to be to create a directory of empty files
with the names of the missing headers and point GCC to it with -I then cproto
can proceed as normal, and generate replacements for the empty files.

Refusing to compile when a header is missing is a huge improvement on the old
behaviour.


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

* [Bug preprocessor/55115] [>=4.5.0 regression] missing headers as fatal breaks cproto logic
  2012-10-29 11:59 [Bug preprocessor/55115] New: [>=4.5.0 regression] missing headers as fatal breaks cproto logic pierre.poissinger at gmail dot com
  2012-10-29 12:54 ` [Bug preprocessor/55115] " manu at gcc dot gnu.org
  2012-10-29 14:30 ` redi at gcc dot gnu.org
@ 2012-10-29 14:43 ` pierre.poissinger at gmail dot com
  2012-10-29 14:47 ` manu at gcc dot gnu.org
                   ` (14 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: pierre.poissinger at gmail dot com @ 2012-10-29 14:43 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #3 from Pierre Poissinger <pierre.poissinger at gmail dot com> 2012-10-29 14:42:09 UTC ---
Hi,

Typically: The header is used, and contains all the 'visible' functions found
in source BUT it's only needed:
a) To perform real compilation: To check that function called are called
correctly
b) As export/header for the lib.

cproto only preproc the file via -E option.

Quick 'real life' example:
myfuncs.h: Auto generated proto, generated out of a.c and b.c
a.c: Define a(), calls b() - include 'myfuncs.h'
b.c: Define b() - include 'myfuncs.h'

=> the "include" of the generated myfuncs.h file is to avoid local definitions
+ allow early check if functions signature changes for whatever reasons.

Now - myfuncs.h being auto generated, during first build, prototyping will fail
quickly due to "Missing headers"... 
This create some kind of a "Chicken/Egg" problem :-)

If adding an option is annoying: Maybe then the 'fatal' should not be enforced
if run is limited to preproc only, aka '-E' ?


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

* [Bug preprocessor/55115] [>=4.5.0 regression] missing headers as fatal breaks cproto logic
  2012-10-29 11:59 [Bug preprocessor/55115] New: [>=4.5.0 regression] missing headers as fatal breaks cproto logic pierre.poissinger at gmail dot com
                   ` (2 preceding siblings ...)
  2012-10-29 14:43 ` pierre.poissinger at gmail dot com
@ 2012-10-29 14:47 ` manu at gcc dot gnu.org
  2012-10-29 14:54 ` manu at gcc dot gnu.org
                   ` (13 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: manu at gcc dot gnu.org @ 2012-10-29 14:47 UTC (permalink / raw)
  To: gcc-bugs


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

Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |INVALID

--- Comment #4 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2012-10-29 14:47:12 UTC ---
(In reply to comment #2)
> (In reply to comment #1)
> > If the headers do nothing, just delete them? If the headers do something, how
> > can you preprocess the file without the info from the headers?
> 
> That won't work, I believe cproto parses the errors produced by GCC and figures
> out which declarations are missing based on the errors, then creates a header
> containing those declarations.

That seems an odd way to generate missing declarations. Missing headers may
lead to different code being compiled because of undefined macros, feature test
macros, pragmas, etc.

If the header is missing, then ignoring the error will produce exactly the same
result as commenting out the #include.

Anyway, not a bug.


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

* [Bug preprocessor/55115] [>=4.5.0 regression] missing headers as fatal breaks cproto logic
  2012-10-29 11:59 [Bug preprocessor/55115] New: [>=4.5.0 regression] missing headers as fatal breaks cproto logic pierre.poissinger at gmail dot com
                   ` (3 preceding siblings ...)
  2012-10-29 14:47 ` manu at gcc dot gnu.org
@ 2012-10-29 14:54 ` manu at gcc dot gnu.org
  2012-10-29 14:55 ` pierre.poissinger at gmail dot com
                   ` (12 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: manu at gcc dot gnu.org @ 2012-10-29 14:54 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #5 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2012-10-29 14:53:24 UTC ---
(In reply to comment #3)
> 
> Now - myfuncs.h being auto generated, during first build, prototyping will fail
> quickly due to "Missing headers"... 
> This create some kind of a "Chicken/Egg" problem :-)

So do "touch myfuncs.h" before the first file is built. Or invoke gcc -E in a
temp file for which you comment out the #include "myfuncs.h". Or make cproto do
any of this automatically.

Or even better, use libClang <http://clang.llvm.org/docs/Tooling.html> to do
what you want instead of parsing GCC errors, which are likely to change in
unexpected ways.


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

* [Bug preprocessor/55115] [>=4.5.0 regression] missing headers as fatal breaks cproto logic
  2012-10-29 11:59 [Bug preprocessor/55115] New: [>=4.5.0 regression] missing headers as fatal breaks cproto logic pierre.poissinger at gmail dot com
                   ` (4 preceding siblings ...)
  2012-10-29 14:54 ` manu at gcc dot gnu.org
@ 2012-10-29 14:55 ` pierre.poissinger at gmail dot com
  2012-10-29 15:00 ` pierre.poissinger at gmail dot com
                   ` (11 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: pierre.poissinger at gmail dot com @ 2012-10-29 14:55 UTC (permalink / raw)
  To: gcc-bugs


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

Pierre Poissinger <pierre.poissinger at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |WAITING
         Resolution|INVALID                     |

--- Comment #6 from Pierre Poissinger <pierre.poissinger at gmail dot com> 2012-10-29 14:54:40 UTC ---
(In reply to comment #2)
> Adding an option just for cproto is definitely not a good idea, just fix cproto
> instead.  
cproto use gcc via 'gcc -E' and is actually limit itself at grabbing func
signature.

> The right answer seems to be to create a directory of empty files
> with the names of the missing headers and point GCC to it with -I then cproto
> can proceed as normal, and generate replacements for the empty files.

Yes - but that smells like a complex task to overcome a change of
'functionality' that was there for decades in nearly every compiler :-)

> Refusing to compile when a header is missing is a huge improvement on the old
> behaviour.
Refuse to compile: Yes - I agree
Refuse to preproc: Seems a little bit harsh... and breaks stuffs actually


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

* [Bug preprocessor/55115] [>=4.5.0 regression] missing headers as fatal breaks cproto logic
  2012-10-29 11:59 [Bug preprocessor/55115] New: [>=4.5.0 regression] missing headers as fatal breaks cproto logic pierre.poissinger at gmail dot com
                   ` (5 preceding siblings ...)
  2012-10-29 14:55 ` pierre.poissinger at gmail dot com
@ 2012-10-29 15:00 ` pierre.poissinger at gmail dot com
  2012-10-29 15:03 ` pierre.poissinger at gmail dot com
                   ` (10 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: pierre.poissinger at gmail dot com @ 2012-10-29 15:00 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #7 from Pierre Poissinger <pierre.poissinger at gmail dot com> 2012-10-29 14:59:51 UTC ---
(In reply to comment #4)
> That seems an odd way to generate missing declarations. Missing headers may
> lead to different code being compiled because of undefined macros, feature test
> macros, pragmas, etc.
We don't compile... 
Prototyping only use the preproc result to retrieve function signatures.

When compilation do occurs - headers have been generated and all is fine...

> If the header is missing, then ignoring the error will produce exactly the same
> result as commenting out the #include.
Yes - but that mean to hack around to bypass a "good" idea..

> Anyway, not a bug.
That's why I say "regression" (it is) and "enhancement" :-)


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

* [Bug preprocessor/55115] [>=4.5.0 regression] missing headers as fatal breaks cproto logic
  2012-10-29 11:59 [Bug preprocessor/55115] New: [>=4.5.0 regression] missing headers as fatal breaks cproto logic pierre.poissinger at gmail dot com
                   ` (6 preceding siblings ...)
  2012-10-29 15:00 ` pierre.poissinger at gmail dot com
@ 2012-10-29 15:03 ` pierre.poissinger at gmail dot com
  2012-10-29 15:13 ` manu at gcc dot gnu.org
                   ` (9 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: pierre.poissinger at gmail dot com @ 2012-10-29 15:03 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #8 from Pierre Poissinger <pierre.poissinger at gmail dot com> 2012-10-29 15:03:14 UTC ---
(In reply to comment #5)
> Or even better, use libClang <http://clang.llvm.org/docs/Tooling.html> to do
> what you want instead of parsing GCC errors, which are likely to change in
> unexpected ways.

Did GCC team told me to go on clang side to fix my gcc issues ? :-D


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

* [Bug preprocessor/55115] [>=4.5.0 regression] missing headers as fatal breaks cproto logic
  2012-10-29 11:59 [Bug preprocessor/55115] New: [>=4.5.0 regression] missing headers as fatal breaks cproto logic pierre.poissinger at gmail dot com
                   ` (7 preceding siblings ...)
  2012-10-29 15:03 ` pierre.poissinger at gmail dot com
@ 2012-10-29 15:13 ` manu at gcc dot gnu.org
  2012-10-29 15:24 ` pierre.poissinger at gmail dot com
                   ` (8 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: manu at gcc dot gnu.org @ 2012-10-29 15:13 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #9 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2012-10-29 15:13:33 UTC ---
(In reply to comment #8)
> (In reply to comment #5)
> > Or even better, use libClang <http://clang.llvm.org/docs/Tooling.html> to do
> > what you want instead of parsing GCC errors, which are likely to change in
> > unexpected ways.
> 
> Did GCC team told me to go on clang side to fix my gcc issues ? :-D

Just trying to help! :-D GCC is not really ready for this type of use. But you
can try to develop a gcc plugin: http://gcc.gnu.org/wiki/plugins, and
contribute to GCC any functionality missing for your plugin.

But I honestly think the workarounds Jonathan and I have proposed should be
more than enough to fix your problem.


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

* [Bug preprocessor/55115] [>=4.5.0 regression] missing headers as fatal breaks cproto logic
  2012-10-29 11:59 [Bug preprocessor/55115] New: [>=4.5.0 regression] missing headers as fatal breaks cproto logic pierre.poissinger at gmail dot com
                   ` (8 preceding siblings ...)
  2012-10-29 15:13 ` manu at gcc dot gnu.org
@ 2012-10-29 15:24 ` pierre.poissinger at gmail dot com
  2012-10-31 22:46 ` pierre.poissinger at gmail dot com
                   ` (7 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: pierre.poissinger at gmail dot com @ 2012-10-29 15:24 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #10 from Pierre Poissinger <pierre.poissinger at gmail dot com> 2012-10-29 15:24:04 UTC ---
No issues - made me smile :-)

I know there are way around, just first tried the "upstream" path to see if
there are any "quick" ways to ensure that we won't run into issues when we will
finally use a more recent gcc.

This was mostly due to thing in gcc doc that seems to indicate such problems
are not "new", aka, deps gen have 'support' for "generated" header files.
(except that it's pretty useless for -E type of usage since it suppress preproc
out):

From
http://gcc.gnu.org/onlinedocs/gcc/Preprocessor-Options.html#Preprocessor-Options
-MG
In conjunction with an option such as -M requesting dependency generation, -MG
assumes missing header files are generated files and adds them to the
dependency list without raising an error. The dependency filename is taken
directly from the #include directive without prepending any path. -MG also
suppresses preprocessed output, as a missing header file renders this useless.
This feature is used in automatic updating of makefiles.


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

* [Bug preprocessor/55115] [>=4.5.0 regression] missing headers as fatal breaks cproto logic
  2012-10-29 11:59 [Bug preprocessor/55115] New: [>=4.5.0 regression] missing headers as fatal breaks cproto logic pierre.poissinger at gmail dot com
                   ` (9 preceding siblings ...)
  2012-10-29 15:24 ` pierre.poissinger at gmail dot com
@ 2012-10-31 22:46 ` pierre.poissinger at gmail dot com
  2014-09-14 15:31 ` manu at gcc dot gnu.org
                   ` (6 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: pierre.poissinger at gmail dot com @ 2012-10-31 22:46 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #11 from Pierre Poissinger <pierre.poissinger at gmail dot com> 2012-10-31 22:46:07 UTC ---
Created attachment 28588
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28588
Don't treat missing headers as fatal error if only preproc

Following patch allows preproc only (-E) to not treat missing headers as a
fatal error - a non-fatal error will be raised, as pre-4.5, for that specific
case.

In addition:
* Updated 2 cpp testcases (include2.c/include2a.c) to use "compile" instead of
preproc, so 'terminated' test can be checked
* Added a new cpp testcase (include2b.c) to check preproc will return 'missing
header' error, but does not stop preproc

Notes:
- Patch is done on gcc-4_7-branch
- Did not spot any difference with check-gcc before/after patch [expect
additional testcase]
- Seems to fix my cproto issues


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

* [Bug preprocessor/55115] [>=4.5.0 regression] missing headers as fatal breaks cproto logic
  2012-10-29 11:59 [Bug preprocessor/55115] New: [>=4.5.0 regression] missing headers as fatal breaks cproto logic pierre.poissinger at gmail dot com
                   ` (10 preceding siblings ...)
  2012-10-31 22:46 ` pierre.poissinger at gmail dot com
@ 2014-09-14 15:31 ` manu at gcc dot gnu.org
  2015-02-09  0:12 ` pinskia at gcc dot gnu.org
                   ` (5 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: manu at gcc dot gnu.org @ 2014-09-14 15:31 UTC (permalink / raw)
  To: gcc-bugs

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

Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |Igor.Smirnov at cern dot ch

--- Comment #12 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
*** Bug 46444 has been marked as a duplicate of this bug. ***
>From gcc-bugs-return-461791-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sun Sep 14 15:31:31 2014
Return-Path: <gcc-bugs-return-461791-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 13919 invoked by alias); 14 Sep 2014 15:31:31 -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 13848 invoked by uid 48); 14 Sep 2014 15:31:24 -0000
From: "manu at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug preprocessor/46444] termination of preprocessing by cpp when no include file is found
Date: Sun, 14 Sep 2014 15:31:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: preprocessor
X-Bugzilla-Version: 4.4.5
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: manu at gcc dot gnu.org
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status cc resolution
Message-ID: <bug-46444-4-JnPkHHCFCz@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-46444-4@http.gcc.gnu.org/bugzilla/>
References: <bug-46444-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-09/txt/msg01625.txt.bz2
Content-length: 657

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

Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |manu at gcc dot gnu.org
         Resolution|---                         |DUPLICATE

--- Comment #2 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
There are many work-arounds to achieve what you want to do.

*** This bug has been marked as a duplicate of bug 55115 ***
>From gcc-bugs-return-461792-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sun Sep 14 15:33:45 2014
Return-Path: <gcc-bugs-return-461792-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 16380 invoked by alias); 14 Sep 2014 15:33:45 -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 16354 invoked by uid 48); 14 Sep 2014 15:33:41 -0000
From: "fabien at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/60894] [4.8/4.9/5 Regression] Use of redundant struct keyword in function prototype combined with using statement causes compilation error
Date: Sun, 14 Sep 2014 15:33:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 4.8.1
X-Bugzilla-Keywords: rejects-valid
X-Bugzilla-Severity: normal
X-Bugzilla-Who: fabien at gcc dot gnu.org
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Priority: P2
X-Bugzilla-Assigned-To: fabien at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.8.4
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-60894-4-mowFWQ45RJ@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-60894-4@http.gcc.gnu.org/bugzilla/>
References: <bug-60894-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: 2014-09/txt/msg01626.txt.bz2
Content-length: 599

https://gcc.gnu.org/bugzilla/show_bug.cgi?id`894

--- Comment #9 from fabien at gcc dot gnu.org ---
(In reply to Jason Merrill from comment #8)
> (In reply to fabien from comment #6)
> > I looked into it but did not manage to get it fixed. I will have another try
> > this week. Thanks for the reminder.
>
> Ping?

I have a patch for it, but not perfect as it triggers a minor diagnostic
regression about class-type redefinition in presence of using decl at class
scope. The using decl is no longer mentioned in the diagnostic... I'll try to
make it work, otherwise I would ask you some help...


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

* [Bug preprocessor/55115] [>=4.5.0 regression] missing headers as fatal breaks cproto logic
  2012-10-29 11:59 [Bug preprocessor/55115] New: [>=4.5.0 regression] missing headers as fatal breaks cproto logic pierre.poissinger at gmail dot com
                   ` (11 preceding siblings ...)
  2014-09-14 15:31 ` manu at gcc dot gnu.org
@ 2015-02-09  0:12 ` pinskia at gcc dot gnu.org
  2015-04-09 11:05 ` [Bug preprocessor/55115] [4.8/4.9/5 Regression] " rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: pinskia at gcc dot gnu.org @ 2015-02-09  0:12 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |UNCONFIRMED
     Ever confirmed|1                           |0


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

* [Bug preprocessor/55115] [4.8/4.9/5 Regression] missing headers as fatal breaks cproto logic
  2012-10-29 11:59 [Bug preprocessor/55115] New: [>=4.5.0 regression] missing headers as fatal breaks cproto logic pierre.poissinger at gmail dot com
                   ` (12 preceding siblings ...)
  2015-02-09  0:12 ` pinskia at gcc dot gnu.org
@ 2015-04-09 11:05 ` rguenth at gcc dot gnu.org
  2015-06-23  8:14 ` [Bug preprocessor/55115] [4.8/4.9/5/6 " rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-04-09 11:05 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2
             Status|UNCONFIRMED                 |NEW
      Known to work|                            |4.4.5
           Keywords|                            |diagnostic
   Last reconfirmed|2012-10-29 00:00:00         |2015-04-09
                 CC|                            |jsm28 at gcc dot gnu.org
     Ever confirmed|0                           |1
            Summary|[>=4.5.0 regression]        |[4.8/4.9/5 Regression]
                   |missing headers as fatal    |missing headers as fatal
                   |breaks cproto logic         |breaks cproto logic
   Target Milestone|---                         |4.8.5
      Known to fail|                            |4.5.0, 5.0

--- Comment #13 from Richard Biener <rguenth at gcc dot gnu.org> ---
Caused by r145341 aka fix for PR15638, confirmed.  This was a deliberate
change,
but not for -E (well, you'd have different behavior for -save-temps ...).

We should either close this as WONTFIX or fix it ;)


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

* [Bug preprocessor/55115] [4.8/4.9/5/6 Regression] missing headers as fatal breaks cproto logic
  2012-10-29 11:59 [Bug preprocessor/55115] New: [>=4.5.0 regression] missing headers as fatal breaks cproto logic pierre.poissinger at gmail dot com
                   ` (13 preceding siblings ...)
  2015-04-09 11:05 ` [Bug preprocessor/55115] [4.8/4.9/5 Regression] " rguenth at gcc dot gnu.org
@ 2015-06-23  8:14 ` rguenth at gcc dot gnu.org
  2015-06-26 20:03 ` [Bug preprocessor/55115] [4.9/5/6 " jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-06-23  8:14 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.8.5                       |4.9.3

--- Comment #14 from Richard Biener <rguenth at gcc dot gnu.org> ---
The gcc-4_8-branch is being closed, re-targeting regressions to 4.9.3.


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

* [Bug preprocessor/55115] [4.9/5/6 Regression] missing headers as fatal breaks cproto logic
  2012-10-29 11:59 [Bug preprocessor/55115] New: [>=4.5.0 regression] missing headers as fatal breaks cproto logic pierre.poissinger at gmail dot com
                   ` (14 preceding siblings ...)
  2015-06-23  8:14 ` [Bug preprocessor/55115] [4.8/4.9/5/6 " rguenth at gcc dot gnu.org
@ 2015-06-26 20:03 ` jakub at gcc dot gnu.org
  2015-06-26 20:33 ` jakub at gcc dot gnu.org
  2015-09-01 14:48 ` Robert.Gomes at igt dot com
  17 siblings, 0 replies; 19+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-06-26 20:03 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #15 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 4.9.3 has been released.


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

* [Bug preprocessor/55115] [4.9/5/6 Regression] missing headers as fatal breaks cproto logic
  2012-10-29 11:59 [Bug preprocessor/55115] New: [>=4.5.0 regression] missing headers as fatal breaks cproto logic pierre.poissinger at gmail dot com
                   ` (15 preceding siblings ...)
  2015-06-26 20:03 ` [Bug preprocessor/55115] [4.9/5/6 " jakub at gcc dot gnu.org
@ 2015-06-26 20:33 ` jakub at gcc dot gnu.org
  2015-09-01 14:48 ` Robert.Gomes at igt dot com
  17 siblings, 0 replies; 19+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-06-26 20:33 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.9.3                       |4.9.4


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

* [Bug preprocessor/55115] [4.9/5/6 Regression] missing headers as fatal breaks cproto logic
  2012-10-29 11:59 [Bug preprocessor/55115] New: [>=4.5.0 regression] missing headers as fatal breaks cproto logic pierre.poissinger at gmail dot com
                   ` (16 preceding siblings ...)
  2015-06-26 20:33 ` jakub at gcc dot gnu.org
@ 2015-09-01 14:48 ` Robert.Gomes at igt dot com
  17 siblings, 0 replies; 19+ messages in thread
From: Robert.Gomes at igt dot com @ 2015-09-01 14:48 UTC (permalink / raw)
  To: gcc-bugs

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

RGomes <Robert.Gomes at igt dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |Robert.Gomes at igt dot com

--- Comment #16 from RGomes <Robert.Gomes at igt dot com> ---
Hi,

I have watched this thread for years expecting a switch to be introduced to
allow the former GCC behavior of tolerating missing header files and I can no
longer remain on the side lines.  I echo the sentiment of others that the
ability to permit missing headers is something we rely on to auto-generate said
header files using cproto, and we've been doing this as far back as GCC 3.x. 
Of course missing headers should be an error during compilation, but
pre-compile it is natural to auto-generate a variety of header files, at least
in our situation. I find myself having to downgrade to GCC 4.4.7 in order to
work around this issue, but I would prefer to continue to use future editions
of GCC.  Please see if a safety valve can be put in to allow the former
behavior, it seems like this issue keeps getting bumped to future revisions but
at some point we are going to be between a rock and a hard place with decisions
about OS and GCC upgrades.  Thank you for your anticipated consideration.


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

end of thread, other threads:[~2015-09-01 14:48 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-29 11:59 [Bug preprocessor/55115] New: [>=4.5.0 regression] missing headers as fatal breaks cproto logic pierre.poissinger at gmail dot com
2012-10-29 12:54 ` [Bug preprocessor/55115] " manu at gcc dot gnu.org
2012-10-29 14:30 ` redi at gcc dot gnu.org
2012-10-29 14:43 ` pierre.poissinger at gmail dot com
2012-10-29 14:47 ` manu at gcc dot gnu.org
2012-10-29 14:54 ` manu at gcc dot gnu.org
2012-10-29 14:55 ` pierre.poissinger at gmail dot com
2012-10-29 15:00 ` pierre.poissinger at gmail dot com
2012-10-29 15:03 ` pierre.poissinger at gmail dot com
2012-10-29 15:13 ` manu at gcc dot gnu.org
2012-10-29 15:24 ` pierre.poissinger at gmail dot com
2012-10-31 22:46 ` pierre.poissinger at gmail dot com
2014-09-14 15:31 ` manu at gcc dot gnu.org
2015-02-09  0:12 ` pinskia at gcc dot gnu.org
2015-04-09 11:05 ` [Bug preprocessor/55115] [4.8/4.9/5 Regression] " rguenth at gcc dot gnu.org
2015-06-23  8:14 ` [Bug preprocessor/55115] [4.8/4.9/5/6 " rguenth at gcc dot gnu.org
2015-06-26 20:03 ` [Bug preprocessor/55115] [4.9/5/6 " jakub at gcc dot gnu.org
2015-06-26 20:33 ` jakub at gcc dot gnu.org
2015-09-01 14:48 ` Robert.Gomes at igt 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).