public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug preprocessor/47857] New: Pragma once warning when compiling PCH
@ 2011-02-23 12:32 olafvdspek at gmail dot com
  2011-12-15  2:15 ` [Bug preprocessor/47857] " pinskia at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: olafvdspek at gmail dot com @ 2011-02-23 12:32 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: Pragma once warning when compiling PCH
           Product: gcc
           Version: 4.4.5
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: preprocessor
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: olafvdspek@gmail.com


g++ a.h 

a.h:
#pragma once // warning: #pragma once in main file


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

* [Bug preprocessor/47857] Pragma once warning when compiling PCH
  2011-02-23 12:32 [Bug preprocessor/47857] New: Pragma once warning when compiling PCH olafvdspek at gmail dot com
@ 2011-12-15  2:15 ` pinskia at gcc dot gnu.org
  2011-12-15 10:47 ` olafvdspek at gmail dot com
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu.org @ 2011-12-15  2:15 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-12-15 02:11:02 UTC ---
Dup of bug 39029 which shows the warning is just part of the symptom.

*** This bug has been marked as a duplicate of bug 39029 ***


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

* [Bug preprocessor/47857] Pragma once warning when compiling PCH
  2011-02-23 12:32 [Bug preprocessor/47857] New: Pragma once warning when compiling PCH olafvdspek at gmail dot com
  2011-12-15  2:15 ` [Bug preprocessor/47857] " pinskia at gcc dot gnu.org
@ 2011-12-15 10:47 ` olafvdspek at gmail dot com
  2011-12-15 13:40 ` redi at gcc dot gnu.org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: olafvdspek at gmail dot com @ 2011-12-15 10:47 UTC (permalink / raw)
  To: gcc-bugs

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

Olaf van der Spek <olafvdspek at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |VERIFIED

--- Comment #2 from Olaf van der Spek <olafvdspek at gmail dot com> 2011-12-15 10:41:07 UTC ---
(In reply to comment #1)
> Dup of bug 39029 which shows the warning is just part of the symptom.
> 
> *** This bug has been marked as a duplicate of bug 39029 ***

It's *not* a duplicate. This one is about generating the .gch.
The other one is about using the .gch (and not about the warning message).


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

* [Bug preprocessor/47857] Pragma once warning when compiling PCH
  2011-02-23 12:32 [Bug preprocessor/47857] New: Pragma once warning when compiling PCH olafvdspek at gmail dot com
  2011-12-15  2:15 ` [Bug preprocessor/47857] " pinskia at gcc dot gnu.org
  2011-12-15 10:47 ` olafvdspek at gmail dot com
@ 2011-12-15 13:40 ` redi at gcc dot gnu.org
  2012-04-28 14:40 ` olafvdspek at gmail dot com
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: redi at gcc dot gnu.org @ 2011-12-15 13:40 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-12-15 13:38:25 UTC ---
If you're going to change the status please check what VERIFIED means (we don't
use that status in this bugzilla)


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

* [Bug preprocessor/47857] Pragma once warning when compiling PCH
  2011-02-23 12:32 [Bug preprocessor/47857] New: Pragma once warning when compiling PCH olafvdspek at gmail dot com
                   ` (2 preceding siblings ...)
  2011-12-15 13:40 ` redi at gcc dot gnu.org
@ 2012-04-28 14:40 ` olafvdspek at gmail dot com
  2013-10-03 17:42 ` ripzonetriton at gmail dot com
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: olafvdspek at gmail dot com @ 2012-04-28 14:40 UTC (permalink / raw)
  To: gcc-bugs

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

Olaf van der Spek <olafvdspek at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|VERIFIED                    |UNCONFIRMED
         Resolution|DUPLICATE                   |

--- Comment #4 from Olaf van der Spek <olafvdspek at gmail dot com> 2012-04-28 14:39:51 UTC ---
(In reply to comment #3)
> If you're going to change the status please check what VERIFIED means (we don't
> use that status in this bugzilla)

Oops


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

* [Bug preprocessor/47857] Pragma once warning when compiling PCH
  2011-02-23 12:32 [Bug preprocessor/47857] New: Pragma once warning when compiling PCH olafvdspek at gmail dot com
                   ` (3 preceding siblings ...)
  2012-04-28 14:40 ` olafvdspek at gmail dot com
@ 2013-10-03 17:42 ` ripzonetriton at gmail dot com
  2015-01-07  0:25 ` p_hampson at wargaming dot net
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: ripzonetriton at gmail dot com @ 2013-10-03 17:42 UTC (permalink / raw)
  To: gcc-bugs

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

Joao Matos <ripzonetriton at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ripzonetriton at gmail dot com

--- Comment #5 from Joao Matos <ripzonetriton at gmail dot com> ---
I can also confirm this bug.

Is there any specific reason why GCC emits the pagma once warning while
compiling PCH?


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

* [Bug preprocessor/47857] Pragma once warning when compiling PCH
  2011-02-23 12:32 [Bug preprocessor/47857] New: Pragma once warning when compiling PCH olafvdspek at gmail dot com
                   ` (4 preceding siblings ...)
  2013-10-03 17:42 ` ripzonetriton at gmail dot com
@ 2015-01-07  0:25 ` p_hampson at wargaming dot net
  2023-08-24  8:31 ` [Bug pch/47857] " egallager at gcc dot gnu.org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: p_hampson at wargaming dot net @ 2015-01-07  0:25 UTC (permalink / raw)
  To: gcc-bugs

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

Paul "TBBle" Hampson <p_hampson at wargaming dot net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |p_hampson at wargaming dot net

--- Comment #6 from Paul "TBBle" Hampson <p_hampson at wargaming dot net> ---
This looks like a specific instance or duplicate of the much older bug 9471.


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

* [Bug pch/47857] Pragma once warning when compiling PCH
  2011-02-23 12:32 [Bug preprocessor/47857] New: Pragma once warning when compiling PCH olafvdspek at gmail dot com
                   ` (5 preceding siblings ...)
  2015-01-07  0:25 ` p_hampson at wargaming dot net
@ 2023-08-24  8:31 ` egallager at gcc dot gnu.org
  2023-11-14 22:55 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: egallager at gcc dot gnu.org @ 2023-08-24  8:31 UTC (permalink / raw)
  To: gcc-bugs

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

Eric Gallager <egallager at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2023-08-24
     Ever confirmed|0                           |1
                 CC|                            |egallager at gcc dot gnu.org
             Status|UNCONFIRMED                 |NEW

--- Comment #9 from Eric Gallager <egallager at gcc dot gnu.org> ---
Confirming via bug 89808

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

* [Bug pch/47857] Pragma once warning when compiling PCH
  2011-02-23 12:32 [Bug preprocessor/47857] New: Pragma once warning when compiling PCH olafvdspek at gmail dot com
                   ` (6 preceding siblings ...)
  2023-08-24  8:31 ` [Bug pch/47857] " egallager at gcc dot gnu.org
@ 2023-11-14 22:55 ` cvs-commit at gcc dot gnu.org
  2023-11-14 22:58 ` lhyatt at gcc dot gnu.org
  2024-02-11 10:29 ` pinskia at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-11-14 22:55 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Lewis Hyatt <lhyatt@gcc.gnu.org>:

https://gcc.gnu.org/g:9938645fcf914ec2a3fa8137cf1456ad4af5f77c

commit r14-5471-g9938645fcf914ec2a3fa8137cf1456ad4af5f77c
Author: Lewis Hyatt <lhyatt@gmail.com>
Date:   Fri Nov 10 11:10:18 2023 -0500

    c-family: Let libcpp know when the compilation is for a PCH [PR9471]

    libcpp will generate diagnostics when it encounters things in the main file
    that only belong in a header file, such as `#pragma once' or `#pragma GCC
    system_header'. But sometimes the main file is a header file that is just
    being compiled separately, e.g. to produce a C++ module or a PCH, in which
    case such diagnostics should be suppressed. libcpp already has an interface
    to request that, so make use of it in the C frontends to prevent libcpp
from
    issuing unwanted diagnostics when compiling a PCH.

    gcc/c-family/ChangeLog:

            PR pch/9471
            PR pch/47857
            * c-opts.cc (c_common_post_options): Set cpp_opts->main_search
            so libcpp knows it is compiling a header file separately.

    gcc/testsuite/ChangeLog:

            PR pch/9471
            PR pch/47857
            * g++.dg/pch/main-file-warnings.C: New test.
            * g++.dg/pch/main-file-warnings.Hs: New test.
            * gcc.dg/pch/main-file-warnings.c: New test.
            * gcc.dg/pch/main-file-warnings.hs: New test.

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

* [Bug pch/47857] Pragma once warning when compiling PCH
  2011-02-23 12:32 [Bug preprocessor/47857] New: Pragma once warning when compiling PCH olafvdspek at gmail dot com
                   ` (7 preceding siblings ...)
  2023-11-14 22:55 ` cvs-commit at gcc dot gnu.org
@ 2023-11-14 22:58 ` lhyatt at gcc dot gnu.org
  2024-02-11 10:29 ` pinskia at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: lhyatt at gcc dot gnu.org @ 2023-11-14 22:58 UTC (permalink / raw)
  To: gcc-bugs

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

Lewis Hyatt <lhyatt at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |lhyatt at gcc dot gnu.org
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #11 from Lewis Hyatt <lhyatt at gcc dot gnu.org> ---
Fixed for GCC 14.

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

* [Bug pch/47857] Pragma once warning when compiling PCH
  2011-02-23 12:32 [Bug preprocessor/47857] New: Pragma once warning when compiling PCH olafvdspek at gmail dot com
                   ` (8 preceding siblings ...)
  2023-11-14 22:58 ` lhyatt at gcc dot gnu.org
@ 2024-02-11 10:29 ` pinskia at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-02-11 10:29 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |14.0

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

end of thread, other threads:[~2024-02-11 10:29 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-23 12:32 [Bug preprocessor/47857] New: Pragma once warning when compiling PCH olafvdspek at gmail dot com
2011-12-15  2:15 ` [Bug preprocessor/47857] " pinskia at gcc dot gnu.org
2011-12-15 10:47 ` olafvdspek at gmail dot com
2011-12-15 13:40 ` redi at gcc dot gnu.org
2012-04-28 14:40 ` olafvdspek at gmail dot com
2013-10-03 17:42 ` ripzonetriton at gmail dot com
2015-01-07  0:25 ` p_hampson at wargaming dot net
2023-08-24  8:31 ` [Bug pch/47857] " egallager at gcc dot gnu.org
2023-11-14 22:55 ` cvs-commit at gcc dot gnu.org
2023-11-14 22:58 ` lhyatt at gcc dot gnu.org
2024-02-11 10:29 ` 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).