This is the mail archive of the
mailing list for the GCC project.
Re: new __builtin_choose_type (patch) (new builtin_equal_types patch)
On Sat, Oct 06, 2001 at 12:38:36AM +0100, Joseph S. Myers wrote:
> In C++, I expect that the new parser can do this easily. In C, you could
> perhaps develop a kludge: suppress but store the error and warning
> messages while parsing the expressions, then regurgitate them for the
> expression that gets selected. The new parser branch contains the
> required diagnostic machinery to do this. (However, in C an expression
> can declare new types, and any declarations from the ignored expression
> would still remain in scope.)
I'd been thinking more along the lines of having parsing and
semantic analysis separated into two phases. Mucking with
diagnostics is probably easier though.