This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/17499] long long constant broken


------- Additional Comments From pyrodave at msn dot com  2004-09-17 19:58 -------
> %d prints an "int".  If you want to print a long, you must use %ld.  If 
> you want to print a long long, you must use %lld.  This is according to 
> the ISO C99 standard.  Since this is a relatively recent standard, your 
> C library may not support it, and/or may have it own different 
> extensions for long long.  This isn't a gcc issue, and gcc does not 
> contain a C library.  See the docs for your C library.
I am such an ameteur, and whats worse, I knew better....You are absolutely
correct...  In my frustration I was intermingling C and C++ and went totally
braindead on stdio crap.(Good thing I don't program for a living...)

Although I thought 
18446744073709551615 was the ULLONG_MAX....Why is 
10293847561029384756 returning a negative value (-08152896512680166860)?  No
biggie, I'm not looking for an answer to that here.   Please forgive my ignorance.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17499


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]