public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org> To: gcc-bugs@gcc.gnu.org Subject: Compilation of rust-demangle.c fails on MinGW Date: Sat, 31 Jul 2021 15:56:33 +0300 [thread overview] Message-ID: <83h7gaprpa.fsf@gnu.org> (raw) The version of rust-demangle.c included with Binutils 2.37 doesn't compile with MinGW: mingw32-gcc -c -DHAVE_CONFIG_H -O2 -gdwarf-4 -g3 -I. -I../../binutils-2.37/libiberty/../include -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -Wshadow=local -pedantic -D_GNU_SOURCE ../../binutils-2.37/libiberty/rust-demangle.c -o rust-demangle.o ../../binutils-2.37/libiberty/rust-demangle.c:84:3: error: unknown type name 'uint' 84 | uint recursion; | ^~~~ ../../binutils-2.37/libiberty/rust-demangle.c: In function 'demangle_path': ../../binutils-2.37/libiberty/rust-demangle.c:87:37: error: 'uint' undeclared (first use in this function); did you mean 'int'? 87 | #define RUST_NO_RECURSION_LIMIT ((uint) -1) | ^~~~ ../../binutils-2.37/libiberty/rust-demangle.c:686:25: note: in expansion of macro 'RUST_NO_RECURSION_LIMIT' 686 | if (rdm->recursion != RUST_NO_RECURSION_LIMIT) | ^~~~~~~~~~~~~~~~~~~~~~~ ../../binutils-2.37/libiberty/rust-demangle.c:87:37: note: each undeclared identifier is reported only once for each function it appears in 87 | #define RUST_NO_RECURSION_LIMIT ((uint) -1) | ^~~~ ../../binutils-2.37/libiberty/rust-demangle.c:686:25: note: in expansion of macro 'RUST_NO_RECURSION_LIMIT' 686 | if (rdm->recursion != RUST_NO_RECURSION_LIMIT) | ^~~~~~~~~~~~~~~~~~~~~~~ ../../binutils-2.37/libiberty/rust-demangle.c: In function 'rust_demangle_callback': ../../binutils-2.37/libiberty/rust-demangle.c:87:37: error: 'uint' undeclared (first use in this function); did you mean 'int'? 87 | #define RUST_NO_RECURSION_LIMIT ((uint) -1) | ^~~~ ../../binutils-2.37/libiberty/rust-demangle.c:1347:55: note: in expansion of macro 'RUST_NO_RECURSION_LIMIT' 1347 | rdm.recursion = (options & DMGL_NO_RECURSE_LIMIT) ? RUST_NO_RECURSION_LIMIT : 0; | ^~~~~~~~~~~~~~~~~~~~~~~ This is because the data type 'uint' is not defined in the MinGW headers. I used uint32_t instead, and it compiled OK.
next reply other threads:[~2021-07-31 12:56 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-07-31 12:56 Eli Zaretskii [this message] 2021-08-04 12:04 ` Richard Sandiford 2021-08-04 12:17 ` Eli Zaretskii 2021-08-04 13:03 ` Jonathan Wakely 2021-08-04 13:49 ` Eli Zaretskii 2021-08-04 13:35 ` Andreas Schwab 2021-08-04 13:51 ` Eli Zaretskii 2021-08-04 14:41 ` Jonathan Wakely 2021-08-04 15:45 ` Eli Zaretskii 2021-08-04 18:57 ` Andrew Pinski 2021-08-04 19:14 ` Eli Zaretskii
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=83h7gaprpa.fsf@gnu.org \ --to=eliz@gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).