This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] [WebAssembly] Disassembler support
- From: Simon Marchi <simon dot marchi at ericsson dot com>
- To: <pipcet at gmail dot com>
- Cc: <binutils at sourceware dot org>
- Date: Thu, 6 Apr 2017 15:39:22 -0400
- Subject: Re: [PATCH] [WebAssembly] Disassembler support
- Authentication-results: sourceware.org; auth=none
- Authentication-results: sourceware.org; dkim=none (message not signed) header.d=none;sourceware.org; dmarc=none action=none header.from=ericsson.com;
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
Hi Pip,
With gcc 4.8.4 (default on Ubuntu 14.04, so not thaaat old), I get this:
/home/emaisin/src/binutils-gdb/opcodes/wasm32-dis.c: In function ‘print_insn_wasm32’:
/home/emaisin/src/binutils-gdb/opcodes/wasm32-dis.c:408:34: error: ‘DECIMAL_DIG’ undeclared (first use in this function)
prin (stream, " %.*g", DECIMAL_DIG, fconstant);
^
/home/emaisin/src/binutils-gdb/opcodes/wasm32-dis.c:408:34: note: each undeclared identifier is reported only once for each function it appears in
According to [1], DECIMAL_DIG appeared in C99, and the default mode for gcc 4.8.4
is C89. It compiles fine when I add -std=c99 to CFLAGS. If people are ok with
requiring that version of the C language, it would be nice to add it to CFLAGS in
the Makefile.
Thanks,
Simon
[1] http://en.cppreference.com/w/c/types/limits