This is the mail archive of the
mailing list for the GCC project.
Re: [tree-ssa] diagnosing switch errors
- From: Jason Merrill <jason at redhat dot com>
- To: Richard Henderson <rth at twiddle dot net>
- Cc: java at gcc dot gnu dot org, fortran at gcc dot gnu dot org, gcc at gcc dot gnu dot org
- Date: Thu, 30 Oct 2003 08:21:54 -1000
- Subject: Re: [tree-ssa] diagnosing switch errors
- References: <20031030180514.GA30900@twiddle.net>
On Thu, 30 Oct 2003 10:05:14 -0800, Richard Henderson <email@example.com> wrote:
> So I'm looking at where I should move the bits from stmt.c that
> are intended to handle -Wswitch-default, -Wswitch-enum and the
> like. It'd be nice to do this somewhere that could be reused by
> all front ends.
Conceptually, I agree that these diagnostics should happen in the front
end. But it seems infeasible to share that functionality between the
various front ends, so I think it needs to happen later.
The gimplifier is certainly no less appropriate a place for diagnostics
than the expander. I think it probably makes sense to give these warnings
while lowering the switches.