This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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]

Re: [PATCH] [WebAssembly] Disassembler support


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


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