From c6862a210f48ee4fd2d7fe7ad0e4eca11bea9963 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Thu, 24 Oct 2013 21:49:52 -0700 Subject: Ouch! Turns out the code base has numerous unintended deviations from C90, like mixed declations and statements. GCC doesn't diagnose these without the --pedantic flag. * configure: GCC's --ansi flag should be spelled -ansi. * lib.c (split_str, obj_print): Reorder declaration before statements. (make_sym): Fix similar problem by eliminating a statement. (funcall1, funcall2, funcall3, funcall4): Use assignment to initialize local array with non-constant elements. This is actually good for performance because we only initialize those parts of the array that we use. * lib.h (struct func): Change functype member to unsigned, since enum-typed bitfields are a GCC extension. * match.c (ml_all, mf_all): Use assignments to initialize local struct with non-constants. (do_txeval, v_collect): Slightly revise unwinding macrology with help of new macros to avoid mixing declarations and statements. (spec_bind): Removed spurious semicolon from macro expansion. (v_gather): Reorder two lines to avoid mixed decls and statements. (match_filter): Move declaration of ret a few lines up, ahead of statements. * unwind.c (uw_pop_until): New function. * unwind.h (uw_pop_until): Declared. (uw_mark_frame, uw_fast_return): New macros. --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configure') diff --git a/configure b/configure index 571762d3..dece3572 100755 --- a/configure +++ b/configure @@ -81,7 +81,7 @@ yacc='$(cross)$(tool_prefix)$(yaccname)' yacc_given= nm='$(cross)$(tool_prefix)nm' opt_flags=-O2 -lang_flags='--ansi -D_XOPEN_SOURCE=2' +lang_flags='-ansi -D_XOPEN_SOURCE=2' diag_flags='-Wall -Wmissing-prototypes -Wstrict-prototypes' debug_flags=-g inline= -- cgit v1.2.3