From: Ken Raeburn Date: Sat, 15 May 2010 21:19:05 +0000 (-0400) Subject: * lisp.h (XFLOAT_DATA): Use "0?x:x" to generate an rvalue. (bug#5916) X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~438^2~208^2~43 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5276642588f017741f425c9c83025684feb5afdd;p=emacs.git * lisp.h (XFLOAT_DATA): Use "0?x:x" to generate an rvalue. (bug#5916) (LISP_MAKE_RVALUE) [!USE_LISP_UNION_TYPE && !__GNUC__]: Likewise. --- diff --git a/src/ChangeLog b/src/ChangeLog index 32761b6f446..877accc913b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ 2010-05-15 Ken Raeburn + * lisp.h (XFLOAT_DATA): Use "0?x:x" to generate an + rvalue. (bug#5916) + (LISP_MAKE_RVALUE) [!USE_LISP_UNION_TYPE && !__GNUC__]: Likewise. + * emacs.c (main): Initialize initial-environment and process-environment before generating from env, not after. diff --git a/src/lisp.h b/src/lisp.h index 7d329cc754c..b4ff446b064 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -310,11 +310,10 @@ LISP_MAKE_RVALUE (Lisp_Object o) return o; } #else -/* This isn't quite right - it keeps the argument as an lvalue. - Making it const via casting would help avoid code actually - modifying the location in question, but the casting could cover - other type-related bugs. */ -#define LISP_MAKE_RVALUE(o) (o) +/* This is more portable to pre-C99 non-GCC compilers, but for + backwards compatibility GCC still accepts an old GNU extension + which caused this to only generate a warning. */ +#define LISP_MAKE_RVALUE(o) (0 ? (o) : (o)) #endif #else /* USE_LISP_UNION_TYPE */ @@ -1461,9 +1460,9 @@ struct Lisp_Float }; #ifdef HIDE_LISP_IMPLEMENTATION -#define XFLOAT_DATA(f) (XFLOAT (f)->u.data_ + 0) +#define XFLOAT_DATA(f) (0 ? XFLOAT (f)->u.data_ : XFLOAT (f)->u.data_) #else -#define XFLOAT_DATA(f) (XFLOAT (f)->u.data + 0) +#define XFLOAT_DATA(f) (0 ? XFLOAT (f)->u.data : XFLOAT (f)->u.data) /* This should be used only in alloc.c, which always disables HIDE_LISP_IMPLEMENTATION. */ #define XFLOAT_INIT(f,n) (XFLOAT (f)->u.data = (n))