aboutsummaryrefslogtreecommitdiffstats
path: root/src/lread.c
diff options
context:
space:
mode:
authorPaul Eggert2019-04-25 13:21:39 -0700
committerPaul Eggert2019-04-25 13:23:07 -0700
commit69947311d84a2572e8382e401ab97fdab25cb433 (patch)
tree7c14a5e0a0566c9a053a1e99d37a6a076d9996b7 /src/lread.c
parentca99c00f7574d72cd6d07dbfe0c3011f033ba5e8 (diff)
downloademacs-69947311d84a2572e8382e401ab97fdab25cb433.tar.gz
emacs-69947311d84a2572e8382e401ab97fdab25cb433.zip
Port to Oracle Developer Studio 12.6
This compiler is a bit pickier about checking conformance to the C standard, ranging from syntax trivia (no extra ";" at the top level) to portability trivia (warnings re conversion between function and data pointers) to more-important stuff like lack of support for some __attribute__ usages. * src/dynlib.c (dynlib_addr): First argument is a function pointer, not a data pointer. All callers changed. * src/emacs-module.c (module_function_address): Return module_funcptr, not void *. All uses changed. * src/lisp.h (module_funcptr) [HAVE_MODULES]: New type. * src/lread.c (union ieee754_double): Don’t assume the usual semantics for converting signed to unsigned int when initializing a bitfield, as the Oracle compiler complains and the C standard is unclear. * src/pdumper.c (ALLOW_IMPLICIT_CONVERSION): Make it clearer that -Wsign-conversion is disabled everywhere in this file. (dump_trace, dump_tailq_prepend, dump_tailq_append): Don’t assume __attribute__. (dump_object_self_representing_p): Don’t disable conversion warnings; it’s not needed here. (DEFINE_FROMLISP_FUNC): Avoid possible signal in integer conversion from unsigned to signed. (DEFINE_FROMLISP_FUNC, finish_dump_pvec): Avoid warning about unreachable statements on platforms not supporting the __attribute__. (intmax_t_from_lisp, intmax_t_to_lisp, dump_off_from_lisp) (dump_off_to_lisp, dump_emacs_reloc_immediate_lv) (dump_emacs_reloc_immediate_ptrdiff_t) (dump_emacs_reloc_immediate_intmax_t) (dump_emacs_reloc_immediate_int, dump_emacs_reloc_immediate_bool): Omit stray semicolon that violates C standard. (dump_metadata_for_pdumper): Add cast to pacify compiler complaining about conversion from function pointer to data pointer. (Fdump_emacs_portable): Do not use CALLN to call a function with zero arguments, as C99 prohibits empty initializers. * src/xdisp.c (syms_of_xdisp): Do not nest calls to pure_list, to work around a bug in Oracle Developer Studio 12.6.
Diffstat (limited to 'src/lread.c')
-rw-r--r--src/lread.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lread.c b/src/lread.c
index 6cd1029cd9f..1c97805ca7a 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -3782,7 +3782,7 @@ string_to_number (char const *string, int base, ptrdiff_t *plen)
3782 state |= E_EXP; 3782 state |= E_EXP;
3783 cp += 3; 3783 cp += 3;
3784 union ieee754_double u 3784 union ieee754_double u
3785 = { .ieee_nan = { .exponent = -1, .quiet_nan = 1, 3785 = { .ieee_nan = { .exponent = 0x7ff, .quiet_nan = 1,
3786 .mantissa0 = n >> 31 >> 1, .mantissa1 = n }}; 3786 .mantissa0 = n >> 31 >> 1, .mantissa1 = n }};
3787 value = u.d; 3787 value = u.d;
3788 } 3788 }