This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: V3 PATCH: Use PCH when testing installed compilers
- From: Benjamin Kosnik <bkoz at redhat dot com>
- To: mark at codesourcery dot com
- Cc: libstdc++ at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Fri, 27 May 2005 09:18:43 -0500
- Subject: Re: V3 PATCH: Use PCH when testing installed compilers
- References: <200505262145.j4QLjHCZ002781@sethra.codesourcery.com>
This looks mostly fine, as is.
> // { dg-do compile }
> // { dg-error "no match for" "" { target *-*-* } 41 }
>
> Example 5: Testing with special command line settings, or without the
> use of pre-compiled headers, in particular the stdc++.h.gch file. Any
> ! options here will override the DEFAULT_CXXFLAGS and PCH_CXXFLAGS set
> ! up in the normal.exp file.
> // { dg-options "-O0" { target *-*-* } }
Really? Two stdc++.h.gch files are produced, one for "-g -O2" and one
for "-g -O0". Is there really a predefined macro just for -g? Don't see one.
So, for a simple smoke test:
// test-string.h
#include <string>
// test.cc
#include "test-string.h"
g++ -g -O0 -Winvalid-pch test-string.h
g++ -g -O0 -Winvalid-pch test.cc // no error
g++ -O0 -Winvalid-pch test.cc // no error
Maybe I'm missing something.
-benjamin