LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 01-14-2016, 05:44 PM   #1
dfatlq
Member
 
Registered: May 2012
Posts: 49

Rep: Reputation: Disabled
Why is a UINT_MAX 64 bits on 32 bit linux OS?


Linux debianvm 2.6.32-5-686 #1 SMP Sun May 6 04:01:19 UTC 2012 i686 GNU/Linux

This is true:

#if UINT_MAX == 0xFFFFFFFFFFFFFFFFULL
#error UINT_MAX
#endif


?
 
Old 01-14-2016, 06:11 PM   #2
dfatlq
Member
 
Registered: May 2012
Posts: 49

Original Poster
Rep: Reputation: Disabled
I have a feeling it's the preprocessor since they define it as ~0U

it fails this:

#if UINT_MAX == 0xFFFFFFFFU

but it should be the same.
 
Old 01-15-2016, 05:39 PM   #3
dfatlq
Member
 
Registered: May 2012
Posts: 49

Original Poster
Rep: Reputation: Disabled
Yes, that's what it is, gcc / g++ doesn't handle ~0U as expected since U should make it an unsigned int in the preprocessor (ULL for larger values). That's the way all the other compilers I've used over the years work.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Does an hardware recognized in a Linux 32 bits will work on 64 bits ? raakhbaba Linux - Hardware 6 12-17-2015 02:00 PM
cryptography... what's difference between 8bits / 16 bits / 32 bits/ 64 bits/128bits? ybpark81 Linux - Security 4 02-19-2012 08:38 AM
Why does my 32 bit slackware insist that it's 64 bits? indubitableness Slackware 8 09-20-2009 01:42 PM
32 bits, why O why won't it run in 32 bit depth brokenteeth Linux - Hardware 2 09-22-2006 10:20 AM
LXer: 32-bit plugins under 64 bits LXer Syndicated Linux News 1 08-08-2006 04:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 03:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration