Re: Another hyperspace bug found --> random and Neural Net
"Ger Hobbelt" <[email protected]>
| Newsgroups | gmane.mail.spam.crm114 |
|---|---|
| Message-ID | <[email protected]> |
On Thu, Jun 19, 2008 at 4:24 PM, Dominik 'Rathann' Mierzejewski <[email protected]> wrote: >> Is this me? Is there a flag that says "Yo! Be smart about >> what a type is!" or some such like that? > > There are PRI?64 macros for printf-ing 64bit int types. Hm. Better to cast int32_t et al to [unsigned] long within the printf (as 'long' will be as large or larger than int32 on all CRM114-applicable platforms) and use the %lu, %lx, etc. printf() options. That way, the code can at least compile on compilers which do not know all these new printf flags or use a slightly different set. Don't know of the top of my head if they're part of ISO/C99, but if they are, they're nice only if you wish to restrict your compilers to C99 compliant only. If you do, Windows/MSVC is the first to go away, because they are _partly_ C99 compliant, at least for MSVC2005. (There's a MSVC2008 but few folks use that. Quite a few are still stuck at MSVC2003, which definitely is /not/ compliant. Nor are others out there.) Yes, this solution feels rotten, but that's what you get for supporting 'compatibility' with non 100% C99 / GCC compatible compilers like MSVC and other commercial products. You get your vocabulary limited to the least common denominator. Use the 'newfangled' stuff only when doing internal development where platforms are predefined and [severely] limited in variety or when you ship binaries only. -- Met vriendelijke groeten / Best regards, Ger Hobbelt -------------------------------------------------- web: http://www.hobbelt.com/ http://www.hebbut.net/ mail: [email protected] mobile: +31-6-11 120 978 -------------------------------------------------- ------------------------------------------------------------------------- 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