This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: V3 PATCH: Use PCH when testing installed compilers


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]