[geeks] Quick C question

Joshua D Boyd jdboyd at cs.millersville.edu
Wed Jul 24 23:12:24 CDT 2002


On Thu, Jul 25, 2002 at 12:02:55AM -0400, Greg A. Woods wrote:
> [ On Wednesday, July 24, 2002 at 23:48:56 (-0400), Joshua D Boyd wrote: ]
> > Subject: [geeks] Quick C question
> >
> > In the belief that good code should compile without even warnings, I
> > can't figure out how to make G++ stop warning about this line:
> > 
> > s = s * 2891336453 + 1;
> > 
> > The warning is: 
> > 
> > decimal integer constant is so large that it is unsigned
> 
> 	s = s * 2891336453UL + 1;

Thanks.  That does it.  It now compiles with no warnings.

-- 
Joshua D. Boyd



More information about the geeks mailing list