public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/21769] per-file control over PCH inclusion
       [not found] <bug-21769-4@http.gcc.gnu.org/bugzilla/>
@ 2023-08-17  7:45 ` cvs-commit at gcc dot gnu.org
  2023-11-09  8:10 ` cvs-commit at gcc dot gnu.org
  1 sibling, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-08-17  7:45 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jonathan Wakely <redi@gcc.gnu.org>:

https://gcc.gnu.org/g:91315f23ba127ea4d1a584023bae34e143f6eb8c

commit r14-3276-g91315f23ba127ea4d1a584023bae34e143f6eb8c
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Wed Aug 16 21:46:05 2023 +0100

    libstdc++: Fix testsuite no_pch directive

    The { dg-add-options no_pch } directive is supposed to add a macro
    definition that invalidates the PCH file, and ensures that the #include
    directives in the test file are processed as written. But the proc that
    adds the options actually removes all existing options, cancelling out
    any previous dg-options directive.

    This means that using no_pch will cause FAILs in a file that relies on
    other options set by an earlier dg-options.

    The no_pch directive was added for PR libstdc++/21769 where Janis
    suggested adding it as return "$flags -D__GLIBCXX__=99999999" but what
    was actually committed didn't include the $flags so replaced them.

    Additionally, using no_pch  only prevents the precompiled version of
    <bits/stdc++.h> from being included, it doesn't prevent the
    non-precompiled version being included by -include bits/stdc++.h in the
    test flags. Use regsub to filter that out of the options as well.

    libstdc++-v3/ChangeLog:

            * testsuite/lib/dg-options.exp (add_options_for_no_pch): Remove
            any "-include bits/stdc++.h" from options and add the macro to
            the existing options instead of replacing them.

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

* [Bug libstdc++/21769] per-file control over PCH inclusion
       [not found] <bug-21769-4@http.gcc.gnu.org/bugzilla/>
  2023-08-17  7:45 ` [Bug libstdc++/21769] per-file control over PCH inclusion cvs-commit at gcc dot gnu.org
@ 2023-11-09  8:10 ` cvs-commit at gcc dot gnu.org
  1 sibling, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-11-09  8:10 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Jonathan Wakely
<redi@gcc.gnu.org>:

https://gcc.gnu.org/g:5d036ff51e2491401b9a64705bfd7f7467764260

commit r13-8029-g5d036ff51e2491401b9a64705bfd7f7467764260
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Wed Aug 16 21:46:05 2023 +0100

    libstdc++: Fix testsuite no_pch directive

    The { dg-add-options no_pch } directive is supposed to add a macro
    definition that invalidates the PCH file, and ensures that the #include
    directives in the test file are processed as written. But the proc that
    adds the options actually removes all existing options, cancelling out
    any previous dg-options directive.

    This means that using no_pch will cause FAILs in a file that relies on
    other options set by an earlier dg-options.

    The no_pch directive was added for PR libstdc++/21769 where Janis
    suggested adding it as return "$flags -D__GLIBCXX__=99999999" but what
    was actually committed didn't include the $flags so replaced them.

    Additionally, using no_pch  only prevents the precompiled version of
    <bits/stdc++.h> from being included, it doesn't prevent the
    non-precompiled version being included by -include bits/stdc++.h in the
    test flags. Use regsub to filter that out of the options as well.

    libstdc++-v3/ChangeLog:

            * testsuite/lib/dg-options.exp (add_options_for_no_pch): Remove
            any "-include bits/stdc++.h" from options and add the macro to
            the existing options instead of replacing them.

    (cherry picked from commit 91315f23ba127ea4d1a584023bae34e143f6eb8c)

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

* [Bug libstdc++/21769] per-file control over PCH inclusion
       [not found] <bug-21769-365@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2010-02-23  9:42 ` ghazi at gcc dot gnu dot org
@ 2010-02-23 22:40 ` ghazi at gcc dot gnu dot org
  6 siblings, 0 replies; 10+ messages in thread
From: ghazi at gcc dot gnu dot org @ 2010-02-23 22:40 UTC (permalink / raw)
  To: gcc-bugs



-- 

ghazi at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |4.3.4 4.4.3
      Known to work|                            |4.3.5 4.4.4 4.5.0
   Target Milestone|4.5.0                       |4.3.5


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


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

* [Bug libstdc++/21769] per-file control over PCH inclusion
       [not found] <bug-21769-365@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2010-02-23  8:13 ` ghazi at gcc dot gnu dot org
@ 2010-02-23  9:42 ` ghazi at gcc dot gnu dot org
  2010-02-23 22:40 ` ghazi at gcc dot gnu dot org
  6 siblings, 0 replies; 10+ messages in thread
From: ghazi at gcc dot gnu dot org @ 2010-02-23  9:42 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from ghazi at gcc dot gnu dot org  2010-02-23 09:42 -------
Subject: Bug 21769

Author: ghazi
Date: Tue Feb 23 09:41:37 2010
New Revision: 156991

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=156991
Log:
        Backport:
        2010-01-20  Janis Johnson  <janis187@us.ibm.com>
                    Paolo Carlini  <paolo.carlini@oracle.com>

        PR libstdc++/21769
        * testsuite/lib/dg-options.exp (add_options_for_no_pch): Add.
        * testsuite/26_numerics/headers/cmath/c99_classification_macros_c.cc:
        Use it.


Modified:
    branches/gcc-4_3-branch/libstdc++-v3/ChangeLog
   
branches/gcc-4_3-branch/libstdc++-v3/testsuite/26_numerics/headers/cmath/c99_classification_macros_c.cc
    branches/gcc-4_3-branch/libstdc++-v3/testsuite/lib/dg-options.exp


-- 


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


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

* [Bug libstdc++/21769] per-file control over PCH inclusion
       [not found] <bug-21769-365@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2010-01-20 12:04 ` paolo dot carlini at oracle dot com
@ 2010-02-23  8:13 ` ghazi at gcc dot gnu dot org
  2010-02-23  9:42 ` ghazi at gcc dot gnu dot org
  2010-02-23 22:40 ` ghazi at gcc dot gnu dot org
  6 siblings, 0 replies; 10+ messages in thread
From: ghazi at gcc dot gnu dot org @ 2010-02-23  8:13 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from ghazi at gcc dot gnu dot org  2010-02-23 08:12 -------
Subject: Bug 21769

Author: ghazi
Date: Tue Feb 23 08:12:35 2010
New Revision: 156990

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=156990
Log:
        Backport:
        2010-01-20  Janis Johnson  <janis187@us.ibm.com>
                    Paolo Carlini  <paolo.carlini@oracle.com>

        PR libstdc++/21769
        * testsuite/lib/dg-options.exp (add_options_for_no_pch): Add.
        * testsuite/26_numerics/headers/cmath/c99_classification_macros_c.cc:
        Use it.


Modified:
    branches/gcc-4_4-branch/libstdc++-v3/ChangeLog
   
branches/gcc-4_4-branch/libstdc++-v3/testsuite/26_numerics/headers/cmath/c99_classification_macros_c.cc
    branches/gcc-4_4-branch/libstdc++-v3/testsuite/lib/dg-options.exp


-- 


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


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

* [Bug libstdc++/21769] per-file control over PCH inclusion
       [not found] <bug-21769-365@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2010-01-20 11:58 ` paolo at gcc dot gnu dot org
@ 2010-01-20 12:04 ` paolo dot carlini at oracle dot com
  2010-02-23  8:13 ` ghazi at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: paolo dot carlini at oracle dot com @ 2010-01-20 12:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from paolo dot carlini at oracle dot com  2010-01-20 12:04 -------
Done.


-- 

paolo dot carlini at oracle dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.5.0


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


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

* [Bug libstdc++/21769] per-file control over PCH inclusion
       [not found] <bug-21769-365@http.gcc.gnu.org/bugzilla/>
  2009-07-27 23:52 ` janis at gcc dot gnu dot org
  2010-01-20  1:36 ` paolo dot carlini at oracle dot com
@ 2010-01-20 11:58 ` paolo at gcc dot gnu dot org
  2010-01-20 12:04 ` paolo dot carlini at oracle dot com
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: paolo at gcc dot gnu dot org @ 2010-01-20 11:58 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from paolo at gcc dot gnu dot org  2010-01-20 11:58 -------
Subject: Bug 21769

Author: paolo
Date: Wed Jan 20 11:57:44 2010
New Revision: 156075

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=156075
Log:
2010-01-20  Janis Johnson  <janis187@us.ibm.com>
            Paolo Carlini  <paolo.carlini@oracle.com>

        PR libstdc++/21769
        * testsuite/lib/dg-options.exp (add_options_for_no_pch): Add.
        * testsuite/26_numerics/headers/cmath/c99_classification_macros_c.cc:
        Use it.


Modified:
    trunk/libstdc++-v3/ChangeLog
   
trunk/libstdc++-v3/testsuite/26_numerics/headers/cmath/c99_classification_macros_c.cc
    trunk/libstdc++-v3/testsuite/lib/dg-options.exp


-- 


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


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

* [Bug libstdc++/21769] per-file control over PCH inclusion
       [not found] <bug-21769-365@http.gcc.gnu.org/bugzilla/>
  2009-07-27 23:52 ` janis at gcc dot gnu dot org
@ 2010-01-20  1:36 ` paolo dot carlini at oracle dot com
  2010-01-20 11:58 ` paolo at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: paolo dot carlini at oracle dot com @ 2010-01-20  1:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from paolo dot carlini at oracle dot com  2010-01-20 01:36 -------
For now at least I'll simply add what Janis suggested and then use it to
clean-up the long standing XPASS of c99_classification_macros_c.cc (few people
complained about it)


-- 

paolo dot carlini at oracle dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |paolo dot carlini at oracle
                   |dot org                     |dot com
             Status|NEW                         |ASSIGNED


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


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

* [Bug libstdc++/21769] per-file control over PCH inclusion
       [not found] <bug-21769-365@http.gcc.gnu.org/bugzilla/>
@ 2009-07-27 23:52 ` janis at gcc dot gnu dot org
  2010-01-20  1:36 ` paolo dot carlini at oracle dot com
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: janis at gcc dot gnu dot org @ 2009-07-27 23:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from janis at gcc dot gnu dot org  2009-07-27 23:51 -------
Changing dg-do would be very messy.  Instead, use the existing dg-add-options. 
Add the following to libstdc++-v3/testsuite/dg-options.exp:

---------------------------------------------------------------------------
# Add to FLAGS all the target-specific flags needed to disable PCH.

proc add_options_for_no_pch { flags } {
    # This forces any generated and possibly included PCH to be invalid.
    return "$flags -D__GLIBCXX__=99999999"
}
---------------------------------------------------------------------------

In a test that should disable PCH, use

// { dg-add-options no_pch }


-- 


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


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

* [Bug libstdc++/21769] per-file control over PCH inclusion
  2005-05-26 16:05 [Bug libstdc++/21769] New: " bkoz at gcc dot gnu dot org
@ 2005-05-26 20:12 ` pinskia at gcc dot gnu dot org
  0 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-05-26 20:12 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-05-26 20:12 -------
Confirmed, the other thing we could do is add a -fno-pch to the front-end and use that when "dg-do 
compile-no-pch" is used.

Confirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-05-26 20:12:17
               date|                            |


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


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

end of thread, other threads:[~2023-11-09  8:10 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-21769-4@http.gcc.gnu.org/bugzilla/>
2023-08-17  7:45 ` [Bug libstdc++/21769] per-file control over PCH inclusion cvs-commit at gcc dot gnu.org
2023-11-09  8:10 ` cvs-commit at gcc dot gnu.org
     [not found] <bug-21769-365@http.gcc.gnu.org/bugzilla/>
2009-07-27 23:52 ` janis at gcc dot gnu dot org
2010-01-20  1:36 ` paolo dot carlini at oracle dot com
2010-01-20 11:58 ` paolo at gcc dot gnu dot org
2010-01-20 12:04 ` paolo dot carlini at oracle dot com
2010-02-23  8:13 ` ghazi at gcc dot gnu dot org
2010-02-23  9:42 ` ghazi at gcc dot gnu dot org
2010-02-23 22:40 ` ghazi at gcc dot gnu dot org
2005-05-26 16:05 [Bug libstdc++/21769] New: " bkoz at gcc dot gnu dot org
2005-05-26 20:12 ` [Bug libstdc++/21769] " pinskia 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).