Skip to content

Commit

Permalink
Eliminate the only use of VOIDFLAGS, as part of STMT_START in perl.h
Browse files Browse the repository at this point in the history
STMT_START has used VOIDFLAGS as part of its conditional compilation since it
was added by commit 728e280 (March 1996). The code originally read:

   /* Now which other defined()s do we need here ??? */

Since then it has been amended to avoid entering that definition for GCC
on Solaris. Given that all current Solaris compilers are C89 conformant,
VOIDFLAGS will always be true (actually 15), so the test is redundant.
Even back in 1996, it's possible that VOIDFLAGS was always non-zero on
SunOS, rendering the test obsolete from the start.

Spotted by Brian Fraser, and extracted from a larger patch of his.
  • Loading branch information
nwc10 committed Sep 16, 2013
1 parent de2d3e8 commit 1400a53
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion perl.h
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ struct op *Perl_op asm(stringify(OP_IN_REGISTER));
# define STMT_END )
# else
/* Now which other defined()s do we need here ??? */
# if (VOIDFLAGS) && (defined(sun) || defined(__sun__)) && !defined(__GNUC__)
# if (defined(sun) || defined(__sun__)) && !defined(__GNUC__)
# define STMT_START if (1)
# define STMT_END else (void)0
# else
Expand Down

0 comments on commit 1400a53

Please sign in to comment.