public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug preprocessor/89808] An option to disable warning "#pragma once in main file"
       [not found] <bug-89808-4@http.gcc.gnu.org/bugzilla/>
@ 2021-03-31  5:31 ` jbassett271 at gmail dot com
  2021-06-14 19:05 ` colomar.6.4.3 at gmail dot com
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 6+ messages in thread
From: jbassett271 at gmail dot com @ 2021-03-31  5:31 UTC (permalink / raw)
  To: gcc-bugs

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

Justin Bassett <jbassett271 at gmail dot com> changed:

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

--- Comment #11 from Justin Bassett <jbassett271 at gmail dot com> ---
An additional use case: to test that header files can compile in isolation, one
could compile the header file with -fsyntax-only ( g++ -xc++ -fsyntax-only
myheader.hpp ). However, this emits the "#pragma once in main file" warning,
which is undesirable, especially because it makes -Werror impossible. This
means that a tool for checking header file isolation would have to emit a new
file to check header isolation.

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

* [Bug preprocessor/89808] An option to disable warning "#pragma once in main file"
       [not found] <bug-89808-4@http.gcc.gnu.org/bugzilla/>
  2021-03-31  5:31 ` [Bug preprocessor/89808] An option to disable warning "#pragma once in main file" jbassett271 at gmail dot com
@ 2021-06-14 19:05 ` colomar.6.4.3 at gmail dot com
  2023-08-24  6:10 ` diego.santacruz at spinetix dot com
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 6+ messages in thread
From: colomar.6.4.3 at gmail dot com @ 2021-06-14 19:05 UTC (permalink / raw)
  To: gcc-bugs

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

Alejandro Colomar <colomar.6.4.3 at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |colomar.6.4.3 at gmail dot com

--- Comment #12 from Alejandro Colomar <colomar.6.4.3 at gmail dot com> ---
Still buggy in gcc-11 (Debian 11.1.0-3) 11.1.0

I'll have a look at the code and see if I can fix it.

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

* [Bug preprocessor/89808] An option to disable warning "#pragma once in main file"
       [not found] <bug-89808-4@http.gcc.gnu.org/bugzilla/>
  2021-03-31  5:31 ` [Bug preprocessor/89808] An option to disable warning "#pragma once in main file" jbassett271 at gmail dot com
  2021-06-14 19:05 ` colomar.6.4.3 at gmail dot com
@ 2023-08-24  6:10 ` diego.santacruz at spinetix dot com
  2023-08-24  6:30 ` pinskia at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 6+ messages in thread
From: diego.santacruz at spinetix dot com @ 2023-08-24  6:10 UTC (permalink / raw)
  To: gcc-bugs

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

Diego SC <diego.santacruz at spinetix dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |diego.santacruz at spinetix dot co
                   |                            |m

--- Comment #13 from Diego SC <diego.santacruz at spinetix dot com> ---
Another use case.

We are using precompiled headers in our application, and that includes headers
which have "#pragma once". When generating the precompiled header we get this
warning:

  warning: #pragma once in main file

In that context the warning is actually invalid, so it would be really nice to
be able to turn this warning off, without turning off all warnings.

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

* [Bug preprocessor/89808] An option to disable warning "#pragma once in main file"
       [not found] <bug-89808-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2023-08-24  6:10 ` diego.santacruz at spinetix dot com
@ 2023-08-24  6:30 ` pinskia at gcc dot gnu.org
  2024-02-11 10:28 ` pinskia at gcc dot gnu.org
  2024-03-02  4:58 ` kmatsui at gcc dot gnu.org
  5 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-08-24  6:30 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=47857

--- Comment #14 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Diego SC from comment #13)
> Another use case.
> 
> We are using precompiled headers in our application, and that includes
> headers which have "#pragma once". When generating the precompiled header we
> get this warning:
> 
>   warning: #pragma once in main file
> 
> In that context the warning is actually invalid, so it would be really nice
> to be able to turn this warning off, without turning off all warnings.

That is PR 47857 .

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

* [Bug preprocessor/89808] An option to disable warning "#pragma once in main file"
       [not found] <bug-89808-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2023-08-24  6:30 ` pinskia at gcc dot gnu.org
@ 2024-02-11 10:28 ` pinskia at gcc dot gnu.org
  2024-03-02  4:58 ` kmatsui at gcc dot gnu.org
  5 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-02-11 10:28 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #15 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 113873 has been marked as a duplicate of this bug. ***

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

* [Bug preprocessor/89808] An option to disable warning "#pragma once in main file"
       [not found] <bug-89808-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2024-02-11 10:28 ` pinskia at gcc dot gnu.org
@ 2024-03-02  4:58 ` kmatsui at gcc dot gnu.org
  5 siblings, 0 replies; 6+ messages in thread
From: kmatsui at gcc dot gnu.org @ 2024-03-02  4:58 UTC (permalink / raw)
  To: gcc-bugs

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

Ken Matsui <kmatsui at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |kmatsui at gcc dot gnu.org
                 CC|                            |kmatsui at gcc dot gnu.org

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

end of thread, other threads:[~2024-03-02  4:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-89808-4@http.gcc.gnu.org/bugzilla/>
2021-03-31  5:31 ` [Bug preprocessor/89808] An option to disable warning "#pragma once in main file" jbassett271 at gmail dot com
2021-06-14 19:05 ` colomar.6.4.3 at gmail dot com
2023-08-24  6:10 ` diego.santacruz at spinetix dot com
2023-08-24  6:30 ` pinskia at gcc dot gnu.org
2024-02-11 10:28 ` pinskia at gcc dot gnu.org
2024-03-02  4:58 ` kmatsui 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).