public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug pch/9471] #pragma system_header vs. precompiled headers
       [not found] <bug-9471-4@http.gcc.gnu.org/bugzilla/>
@ 2023-11-14 22:55 ` cvs-commit at gcc dot gnu.org
  2023-11-14 22:57 ` lhyatt at gcc dot gnu.org
  2024-02-11 10:30 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 9+ 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=9471

--- Comment #5 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] 9+ messages in thread

* [Bug pch/9471] #pragma system_header vs. precompiled headers
       [not found] <bug-9471-4@http.gcc.gnu.org/bugzilla/>
  2023-11-14 22:55 ` [Bug pch/9471] #pragma system_header vs. precompiled headers cvs-commit at gcc dot gnu.org
@ 2023-11-14 22:57 ` lhyatt at gcc dot gnu.org
  2024-02-11 10:30 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 9+ messages in thread
From: lhyatt at gcc dot gnu.org @ 2023-11-14 22:57 UTC (permalink / raw)
  To: gcc-bugs

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

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 #6 from Lewis Hyatt <lhyatt at gcc dot gnu.org> ---
Fixed for GCC 14.

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

* [Bug pch/9471] #pragma system_header vs. precompiled headers
       [not found] <bug-9471-4@http.gcc.gnu.org/bugzilla/>
  2023-11-14 22:55 ` [Bug pch/9471] #pragma system_header vs. precompiled headers cvs-commit at gcc dot gnu.org
  2023-11-14 22:57 ` lhyatt at gcc dot gnu.org
@ 2024-02-11 10:30 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-02-11 10:30 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

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

* [Bug pch/9471] #pragma system_header vs. precompiled headers
       [not found] <bug-9471-1920@http.gcc.gnu.org/bugzilla/>
  2006-12-29  4:30 ` tromey at gcc dot gnu dot org
@ 2008-11-28  7:48 ` geoffk at gcc dot gnu dot org
  1 sibling, 0 replies; 9+ messages in thread
From: geoffk at gcc dot gnu dot org @ 2008-11-28  7:48 UTC (permalink / raw)
  To: gcc-bugs



-- 

geoffk at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|geoffk at gcc dot gnu dot   |unassigned at gcc dot gnu
                   |org                         |dot org
             Status|ASSIGNED                    |NEW


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


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

* [Bug pch/9471] #pragma system_header vs. precompiled headers
       [not found] <bug-9471-1920@http.gcc.gnu.org/bugzilla/>
@ 2006-12-29  4:30 ` tromey at gcc dot gnu dot org
  2008-11-28  7:48 ` geoffk at gcc dot gnu dot org
  1 sibling, 0 replies; 9+ messages in thread
From: tromey at gcc dot gnu dot org @ 2006-12-29  4:30 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from tromey at gcc dot gnu dot org  2006-12-29 04:30 -------
I think this same problem will occur with #include_next
and #pragma once.  cpp doesn't currently seem to differentiate between
the PCH case and other kinds of preprocessing.


-- 

tromey at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tromey at gcc dot gnu dot
                   |                            |org


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


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

* [Bug pch/9471] #pragma system_header vs. precompiled headers
       [not found] <20030128034601.9471.bkoz@redhat.com>
                   ` (2 preceding siblings ...)
  2003-12-19 10:09 ` pinskia at gcc dot gnu dot org
@ 2004-06-09 20:18 ` geoffk at gcc dot gnu dot org
  3 siblings, 0 replies; 9+ messages in thread
From: geoffk at gcc dot gnu dot org @ 2004-06-09 20:18 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From geoffk at gcc dot gnu dot org  2004-06-09 20:18 -------
Although the simplified testcase still works, note that with an installed compiler saying

g++ -x c++-header ostream

will say 'file not found' unless there is actually an ostream in the current directory.


-- 


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


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

* [Bug pch/9471] #pragma system_header vs. precompiled headers
       [not found] <20030128034601.9471.bkoz@redhat.com>
  2003-08-04  4:11 ` pinskia at physics dot uc dot edu
  2003-08-23  1:32 ` dhazeghi at yahoo dot com
@ 2003-12-19 10:09 ` pinskia at gcc dot gnu dot org
  2004-06-09 20:18 ` geoffk at gcc dot gnu dot org
  3 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-12-19 10:09 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|3.4.0                       |---
            Version|unknown                     |3.4.0


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


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

* [Bug pch/9471] #pragma system_header vs. precompiled headers
       [not found] <20030128034601.9471.bkoz@redhat.com>
  2003-08-04  4:11 ` pinskia at physics dot uc dot edu
@ 2003-08-23  1:32 ` dhazeghi at yahoo dot com
  2003-12-19 10:09 ` pinskia at gcc dot gnu dot org
  2004-06-09 20:18 ` geoffk at gcc dot gnu dot org
  3 siblings, 0 replies; 9+ messages in thread
From: dhazeghi at yahoo dot com @ 2003-08-23  1:32 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


dhazeghi at yahoo dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED


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

* [Bug pch/9471] #pragma system_header vs. precompiled headers
       [not found] <20030128034601.9471.bkoz@redhat.com>
@ 2003-08-04  4:11 ` pinskia at physics dot uc dot edu
  2003-08-23  1:32 ` dhazeghi at yahoo dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 9+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-08-04  4:11 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


pinskia at physics dot uc dot edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |rejects-valid
   Last reconfirmed|0000-00-00 00:00:00         |2003-08-04 04:11:12
               date|                            |


------- Additional Comments From pinskia at physics dot uc dot edu  2003-08-04 04:11 -------
Simple testcase:
testsys.h:
#pragma GCC system_header
g++ -ansi -Werror -pedantic -Winvalid-pch -o testsys.h.gch -c testsys.h
testsys.h:1:14: #pragma system_header ignored outside include file


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

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

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-9471-4@http.gcc.gnu.org/bugzilla/>
2023-11-14 22:55 ` [Bug pch/9471] #pragma system_header vs. precompiled headers cvs-commit at gcc dot gnu.org
2023-11-14 22:57 ` lhyatt at gcc dot gnu.org
2024-02-11 10:30 ` pinskia at gcc dot gnu.org
     [not found] <bug-9471-1920@http.gcc.gnu.org/bugzilla/>
2006-12-29  4:30 ` tromey at gcc dot gnu dot org
2008-11-28  7:48 ` geoffk at gcc dot gnu dot org
     [not found] <20030128034601.9471.bkoz@redhat.com>
2003-08-04  4:11 ` pinskia at physics dot uc dot edu
2003-08-23  1:32 ` dhazeghi at yahoo dot com
2003-12-19 10:09 ` pinskia at gcc dot gnu dot org
2004-06-09 20:18 ` geoffk at gcc dot gnu dot 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).