[PATCH] Fix c++/38489: auto with fixed point (and part of PR 35338, rejects valid fixed point)
Wed Dec 24 10:26:00 GMT 2008
The problem here is that the C++ front-end does not treat
FIXED_POINT_TYPE as an arithmetic type (ARITHMETIC_TYPE_P). This
fixes the problem by adding FIXED_POINT_TYPE to ARITHMETIC_TYPE_P.
I reopened PR 35338 because the code there is actually valid but just
rejected by the C++ front-end, this is why I changed the testcase
g++.dg/other/error25.C (the C front-end accepts the same code, if I
changed bool to _Bool).
OK? Bootstrapped and tested on i386-darwin8.11 with no regressions.
* cp-tree.h (ARITHMETIC_TYPE_P): Add FIXED_POINT_TYPE.
* g++.dg/ext/fixed3.C: New test.
* g++.dg/other/error25.C: Remove the second dg-error. Change the
first dg-error to dg-bogus.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the Gcc-patches