delorie.com/archives/browse.cgi | search |
X-Authentication-Warning: | delorie.com: mail set sender to djgpp-bounces using -f |
X-Received: | by 10.182.158.4 with SMTP id wq4mr333652obb.18.1392888461261; |
Thu, 20 Feb 2014 01:27:41 -0800 (PST) | |
X-Received: | by 10.50.221.99 with SMTP id qd3mr27615igc.6.1392888461098; Thu, |
20 Feb 2014 01:27:41 -0800 (PST) | |
Newsgroups: | comp.os.msdos.djgpp |
Date: | Thu, 20 Feb 2014 01:27:40 -0800 (PST) |
Complaints-To: | groups-abuse AT google DOT com |
Injection-Info: | glegroupsg2000goo.googlegroups.com; posting-host=114.34.144.113; |
posting-account=WqoaTgoAAABn_56zOqG1zk1m0UvtHqAO | |
NNTP-Posting-Host: | 114.34.144.113 |
User-Agent: | G2/1.0 |
MIME-Version: | 1.0 |
Message-ID: | <61118811-548e-4c11-8d04-e73de3c7da86@googlegroups.com> |
Subject: | DJGPP gcc 4.7.3 and 4.8.2 work inconsistently on type uint32_t. |
From: | Andrew Wu <andrewwu DOT tw AT gmail DOT com> |
Injection-Date: | Thu, 20 Feb 2014 09:27:41 +0000 |
Bytes: | 2185 |
Lines: | 53 |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
Hello, I found that for type uint32_t, DJGPP gcc 4.7.3 and DJGPP gcc 4.8.2 work inconsistently. File x.c: ==== #include <stdint.h> #include <stdio.h> int main() { uint32_t x = 100; printf("Hello %x \n", x); return 0; } ==== Compile the file with "-Wall" to enable all warnings. gcc -Wall -c x.c If I uses DJGPP gcc 4.7.3, there is no problem. But if I use DJGPP gcc 4.8.2, there will be warning message: x.c: In function 'main': x.c:6:3: warning: format '%x' expects argument of type 'unsigned int', but argument 2 has type 'uint32_t' [-Wformat=] printf("Hello %x \n", x); ^ DJGPP gcc 4.7.3 binary files are from the official DJGPP Zip File Picker : http://www.delorie.com/djgpp/zip-picker.html I download and use: bnu224b.zip djdev203.zip gcc473b.zip Other files are not important, so I ignored them. DJGPP gcc 4.8.2 binary files are downloaded from official FTP's beta directory : ftp://ftp.delorie.com/pub/djgpp/beta/ I download and use: bnu224b.zip djdev204.zip gcc482b.zip It seems uint32_t type definition is changed between gcc 4.7.3 and 4.8.2?
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |