This is the mail archive of the
cgen@sourceware.org
mailing list for the CGEN project.
Re: Is there a function in cgen for parsing short integers?
- From: Dave Brolley <brolley at redhat dot com>
- To: Mehak Mahajan <mehak dot mahajan at gmail dot com>
- Cc: cgen at sources dot redhat dot com
- Date: Fri, 18 Apr 2008 17:31:59 -0400
- Subject: Re: Is there a function in cgen for parsing short integers?
- References: <480907B5.8020201@gmail.com>
Why would you want to issue a diagnostic for -1? It's not out of range
for a 16 bit literal. I would think you would be more interested in
cases like 65536 or -65535. As for the user specifying 0xffffffff, I'm
wondering if cgen_parse_signed_integer will indicate an error since (in
C at least) that's out range of a signed 32 bit integer.
Mehak Mahajan wrote:
Hi,
Thanks for your reply. :)
I am doing precisely what you have decribed.
However, I need to differentiate between -1 which is represented as a
16 bit number (0xFFFF) and -1 which is represented as a 32 bit number
(0xFFFFFFFF).
Is there a way to do that?
Cheers,
Mehak