This is the mail archive of the
cgen@sourceware.org
mailing list for the CGEN project.
Re: [PATCH] Make large enum constants unsigned
- From: "Frank Ch. Eigler" <fche at elastic dot org>
- To: Stefan Kristiansson <stefan dot kristiansson at saunalahti dot fi>
- Cc: cgen at sourceware dot org, Alan Modra <amodra at gmail dot com>, fche at sourceware dot org, Christian Svensson <blue at cmd dot nu>, Pierre Muller <pierre dot muller at ics-cnrs dot unistra dot fr>, "Maciej W. Rozycki" <macro at codesourcery dot com>
- Date: Thu, 22 May 2014 17:06:21 -0400
- Subject: Re: [PATCH] Make large enum constants unsigned
- Authentication-results: sourceware.org; auth=none
- References: <20140522052921 dot GA30609 at chokladfabriken dot org> <20140522150956 dot GC4031 at elastic dot org> <CADzBsGN3U6a3BS5L7o7DYh_4KTghEXnB2UE0XKdNZrAN=A0p=g at mail dot gmail dot com>
Hi -
> > (string-append "(signed int)" (number->string (cadr e)))
> [...]
> how would that be better than?
> (string-append (number->string (cadr e)) "U")
It would be a closer match to expressing our desire to match C enum
typing, but I'd be fine with "U" suffixing too.
> I dismissed that, since it would create a lot larger diff in generated
> files than in the isolated cases where it's actually a problem. [...]
IMHO, that's not such a big deal. We don't usually look closely at
the diffs of generated files, once the generating tools are trustworthy.
- FChE