diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2011-10-04 21:57:57 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2011-10-04 21:57:57 +0200 |
commit | 6735db9861e32576ece279f7e9e0ecaa314786a2 (patch) | |
tree | fb8ea13fc908095b0eeed12177afb0820642bcc9 | |
parent | 953f97ddd184f3dfb1ce16ee2965012965b17fac (diff) | |
download | egawk-6735db9861e32576ece279f7e9e0ecaa314786a2.tar.gz egawk-6735db9861e32576ece279f7e9e0ecaa314786a2.tar.bz2 egawk-6735db9861e32576ece279f7e9e0ecaa314786a2.zip |
Make gawk_mb_cur_max compile time constant if no mbs support.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | awk.h | 2 | ||||
-rw-r--r-- | main.c | 2 |
3 files changed, 7 insertions, 3 deletions
@@ -1,3 +1,9 @@ +2011-10-04 Arnold D. Robbins <arnold@skeeve.com> + + * awk.h, main.c (gawk_mb_cur_max): Make it a constant 1 when + MBS_SUPPORT isn't available to allow GCC dead code constant + expression computation and dead code elimination to help out. + 2011-10-02 Arnold D. Robbins <arnold@skeeve.com> * io.c (rsnullscan, get_a_record): Fix the cases where terminators @@ -935,7 +935,7 @@ extern int do_lint_old; #if MBS_SUPPORT extern int gawk_mb_cur_max; #else -extern const int gawk_mb_cur_max; +#define gawk_mb_cur_max (1) #endif #if defined (HAVE_GETGROUPS) && defined(NGROUPS_MAX) && NGROUPS_MAX > 0 @@ -150,8 +150,6 @@ int use_lc_numeric = FALSE; /* obey locale for decimal point */ #if MBS_SUPPORT int gawk_mb_cur_max; /* MB_CUR_MAX value, see comment in main() */ -#else -const int gawk_mb_cur_max = 1; #endif FILE *output_fp; /* default output for debugger */ |