<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7654.12">
<TITLE>RE: [cfe-dev] invalid Assert in Lex/LiteralSupport.cpp?</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>Yes, and that change works too.<BR>
<BR>
- Sanjiv<BR>
<BR>
<BR>
<BR>
-----Original Message-----<BR>
From: Chris Lattner [<A HREF="mailto:clattner@apple.com">mailto:clattner@apple.com</A>]<BR>
Sent: Tue 4/14/2009 12:20 PM<BR>
To: Sanjiv Kumar Gupta - I00171<BR>
Cc: cfe-dev@cs.uiuc.edu<BR>
Subject: Re: [cfe-dev] invalid Assert in Lex/LiteralSupport.cpp?<BR>
<BR>
Have you audited the code to ensure it will behave correctly with <BR>
those assumptions?<BR>
<BR>
-Chris<BR>
<BR>
On Apr 13, 2009, at 11:26 PM, Sanjiv.Gupta@microchip.com wrote:<BR>
<BR>
> CharLiteralParser::CharLiteralParser(const char *begin, const char <BR>
> *end,<BR>
>                                      SourceLocation Loc, <BR>
> Preprocessor &PP) {<BR>
>   // At this point we know that the character matches the regex <BR>
> "L?'.*'".<BR>
><BR>
>   ..<BR>
><BR>
>   // FIXME: This assumes that 'int' is 32-bits in overflow <BR>
> calculation, and the<BR>
>   // size of "value".<BR>
>   assert(PP.getTargetInfo().getIntWidth() == 32 &&<BR>
>          "Assumes sizeof(int) == 4 for now");<BR>
><BR>
> For PIC16, "int" is 16.<BR>
> Should this assert be rather<BR>
><BR>
> assert(PP.getTargetInfo().getIntWidth() <= 32 &&<BR>
>          "Assumes sizeof(int) <= 4 for now");<BR>
><BR>
><BR>
> - Sanjiv<BR>
> _______________________________________________<BR>
> cfe-dev mailing list<BR>
> cfe-dev@cs.uiuc.edu<BR>
> <A HREF="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</A><BR>
<BR>
<BR>
</FONT>
</P>

</BODY>
</HTML>