]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix lisp.h underparenthesization
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 2 Feb 2017 17:52:20 +0000 (09:52 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 2 Feb 2017 17:52:37 +0000 (09:52 -0800)
* src/lisp.h (STACK_CONS, AUTO_STRING_WITH_LEN):
Parenthesize compound literals that are function call args.
Although this does not fix any bugs, it is the proper style for
macro parenthesization as it means this code will continue to
work even if make_lisp_ptr is changed to a macro.

src/lisp.h

index 1ac38164c27e3d580052c73d9f00a6f2ee50c44d..a9011b4a8beba452d5ad4a93fb1982a2b0be8b6d 100644 (file)
@@ -4535,7 +4535,7 @@ enum
    use these only in macros like AUTO_CONS that declare a local
    variable whose lifetime will be clear to the programmer.  */
 #define STACK_CONS(a, b) \
-  make_lisp_ptr (&(union Aligned_Cons) { { a, { b } } }.s, Lisp_Cons)
+  make_lisp_ptr (&((union Aligned_Cons) { { a, { b } } }).s, Lisp_Cons)
 #define AUTO_CONS_EXPR(a, b) \
   (USE_STACK_CONS ? STACK_CONS (a, b) : Fcons (a, b))
 
@@ -4581,8 +4581,7 @@ enum
   Lisp_Object name =                                                   \
     (USE_STACK_STRING                                                  \
      ? (make_lisp_ptr                                                  \
-       ((&(union Aligned_String)                                       \
-         {{len, -1, 0, (unsigned char *) (str)}}.s),                   \
+       ((&((union Aligned_String) {{len, -1, 0, (unsigned char *) (str)}}).s), \
         Lisp_String))                                                  \
      : make_unibyte_string (str, len))