Re: Another hyperspace bug found --> random and Neural Net
Marcus Kool <marcus.kool-x/J+dzphU+SB39Oa/[email protected]>
| Newsgroups | gmane.mail.spam.crm114 |
|---|---|
| Organization | URLfilterDB |
| Message-ID | <[email protected]> |
Back in the old days all C programmers knew exactly how an unsigned long was stored in a machine. Today compilers try to prevent programming errors by mixing types. Even though on *some* systems an unsigned long and an unsigned int and both 4 bytes, a modern compiler sees them as 2 different types and you need to use proper type casts to mix the 2 types. Moral of the story: do not mix types, they can cause a lot of headaches. Marcus Johannes Berg wrote: > On Thu, 2008-06-19 at 08:31 -0400, Bill Yerazunis wrote: >> Yep. Here's another worm (unsightly and annoying)... >> >> Why is it that x86 GCC doesn't believe that "unsigned long" >> and "uint32_t" are the same type underneath? >> >> Specifically, when doing an fprintf, I get annoying warnings >> that there's a type mismatch. >> >> Is this me? Is there a flag that says "Yo! Be smart about >> what a type is!" or some such like that? > > It may be an artifact of the fact that "unsigned long" can be 64-bit > when compiling for 64-bit platforms? (I'm not sure whether that is the > case on x86 but it is on powerpc) > > johannes > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > > > ------------------------------------------------------------------------ > > _______________________________________________ > Crm114-general mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/crm114-general ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php