This is the mail archive of the cgen@sourceware.org mailing list for the CGEN project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Is there a function in cgen for parsing short integers?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]