This is the mail archive of the
mailing list for the GCC project.
Re: crash fix for unhanded operation
- From: Mike Stump <mikestump at comcast dot net>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 9 Sep 2013 16:49:14 -0700
- Subject: Re: crash fix for unhanded operation
- Authentication-results: sourceware.org; auth=none
- References: <44C327AE-2328-4322-B792-61F22DFB1588 at comcast dot net> <Pine dot LNX dot 4 dot 64 dot 1309092246190 dot 1301 at digraph dot polyomino dot org dot uk>
On Sep 9, 2013, at 3:48 PM, "Joseph S. Myers" <email@example.com> wrote:
> On Mon, 9 Sep 2013, Mike Stump wrote:
>> Presently gcc just dies with a crash for an unhanded operation, the
>> below handles it better.
>> I'm torn between sorry and error, error might be better. Thoughts?
> error means there is something wrong with the user's source code,
Right. If one has mode X, and there are no instructions for mode X, the thing that is wrong with their source code is wanting to perform an operation in mode X. The language standard doesn't mandate that the operation for mode X works, so, we are free to just give an error.
> should generally be associated with the location of an erroneous source
> code construct.
Indeed, the ^ points to exactly what is wrong in their source, which is (relatively new and) nice.
> I don't see how it can be appropriate here; my impression
> is that this code should never fail for any compiler input,
Your impression is wrong. It does indeed fail.