[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
unused var gcpro1
From: |
Stefan Monnier |
Subject: |
unused var gcpro1 |
Date: |
Mon, 26 Nov 2001 19:44:00 -0500 |
I got tired of those warnings and came up with the patch below.
It shouldn't make any difference to the code generated (even
with -O0 I can't think of any way the compiler could generate code
for those non-actions).
But since it's a very minor issue, I'd like to know if people think
it's safe enough. If it's not 100% safe, it's probably not worth installing.
Also, it might cause other compilers to spit out other warnings,
since it's a really silly kind of code.
Stefan
*** lisp.h 2001/11/19 06:46:01 1.398
--- lisp.h 2001/11/27 00:36:56
******************************
*** 1813,1824 ****
#endif
#if GC_MARK_STACK == GC_MAKE_GCPROS_NOOPS
! #define GCPRO1(varname) ((void) 0)
! #define GCPRO2(varname1, varname2)((void) 0)
! #define GCPRO3(varname1, varname2, varname3) ((void) 0)
! #define GCPRO4(varname1, varname2, varname3, varname4) ((void) 0)
! #define GCPRO5(varname1, varname2, varname3, varname4, varname5) ((void) 0)
#define UNGCPRO ((void) 0)
#else /* GC_MARK_STACK != GC_MAKE_GCPROS_NOOPS */
--- 1814,1830 ----
#endif
#if GC_MARK_STACK == GC_MAKE_GCPROS_NOOPS
+
+ /* Do something silly with gcproN vars just so gcc shuts up. */
! #define GCPRO1(varname) ((void) gcpro1)
! #define GCPRO2(varname1, varname2)(((void) gcpro2, (void) gcpro1))
! #define GCPRO3(varname1, varname2, varname3) \
! (((void) gcpro3, (void) gcpro2, (void) gcpro1))
! #define GCPRO4(varname1, varname2, varname3, varname4) \
! (((void) gcpro4, (void) gcpro3, (void) gcpro2, (void) gcpro1))
! #define GCPRO5(varname1, varname2, varname3, varname4, varname5) \
! (((void) gcpro5, (void) gcpro4, (void) gcpro3, (void) gcpro2, (void)
gcpro1))
#define UNGCPRO ((void) 0)
#else /* GC_MARK_STACK != GC_MAKE_GCPROS_NOOPS */
Re: printing.el v6.6.2, Vinicius Jose Latorre, 2001/11/28