[cfe-commits] r125474 - in /cfe/trunk: include/clang/Basic/LangOptions.h include/clang/Parse/Parser.h include/clang/Sema/Sema.h lib/Lex/Pragma.cpp lib/Parse/ParsePragma.cpp lib/Parse/ParsePragma.h lib/Parse/Parser.cpp lib/Sema/Sema.cpp lib/Sema/SemaAttr.cpp

Peter Collingbourne peter at pcc.me.uk
Mon Feb 14 12:24:04 PST 2011


On Mon, Feb 14, 2011 at 08:53:59AM -0800, Douglas Gregor wrote:
> > +/// Floating point control options
> > +class FPOptions {
> > +public:
> > +  unsigned fp_contract : 1;
> > +
> > +  FPOptions() : fp_contract(0) {}
> > +
> > +  FPOptions(const LangOptions &LangOpts) :
> > +    fp_contract(LangOpts.DefaultFPContract) {}
> > +};
> > +
> > }  // end namespace clang
> > 
> > #endif
> 
> Please add AST serialization and deserialization for FPOptions to ASTWriter/ASTReader.

Will do.  I will also do the same for OpenCLOptions (r125475) (OpenCL
spec does not anticipate any use case where this would be necessary
but it may be useful for more exotic use cases).

> Is there no way we can test this code?

We can test that we get as far as Sema by issuing a diagnostic there
if the pragma enables FP_CONTRACT, but not much else, I think.

Thanks,
-- 
Peter



More information about the cfe-commits mailing list