[Bug pch/9471] #pragma system_header vs. precompiled headers

2024-02-11 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=9471

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |14.0

[Bug pch/9471] #pragma system_header vs. precompiled headers

2023-11-14 Thread lhyatt at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=9471

Lewis Hyatt  changed:

   What|Removed |Added

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

--- Comment #6 from Lewis Hyatt  ---
Fixed for GCC 14.

[Bug pch/9471] #pragma system_header vs. precompiled headers

2023-11-14 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=9471

--- Comment #5 from CVS Commits  ---
The master branch has been updated by Lewis Hyatt :

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

commit r14-5471-g9938645fcf914ec2a3fa8137cf1456ad4af5f77c
Author: Lewis Hyatt 
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.

[Bug pch/9471] #pragma system_header vs. precompiled headers

2008-11-27 Thread geoffk at gcc dot gnu dot org


-- 

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



[Bug pch/9471] #pragma system_header vs. precompiled headers

2006-12-28 Thread tromey at gcc dot gnu dot org


--- 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