adlint 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/AUTHORS +27 -0
- data/COPYING +674 -0
- data/ChangeLog +820 -0
- data/INSTALL +78 -0
- data/MANIFEST +464 -0
- data/NEWS +38 -0
- data/README +74 -0
- data/Rakefile +167 -0
- data/TODO +29 -0
- data/bin/adlint +141 -0
- data/bin/adlint_chk +129 -0
- data/bin/adlint_cma +122 -0
- data/bin/adlint_sma +129 -0
- data/bin/adlintize +286 -0
- data/etc/conf.d/fallback/cinit.erb +11 -0
- data/etc/conf.d/fallback/traits.erb +216 -0
- data/etc/conf.d/i686-cygwin/cinit-gcc_4.3.4.erb +149 -0
- data/etc/conf.d/i686-cygwin/traits-gcc_4.3.4.erb +227 -0
- data/etc/conf.d/i686-devkit/cinit-gcc_4.5.2.erb +224 -0
- data/etc/conf.d/i686-devkit/traits-gcc_4.5.2.erb +226 -0
- data/etc/conf.d/i686-linux/cinit-gcc_4.5.1.erb +219 -0
- data/etc/conf.d/i686-linux/traits-gcc_4.5.1.erb +224 -0
- data/etc/conf.d/i686-mingw/cinit-gcc_4.6.1.erb +234 -0
- data/etc/conf.d/i686-mingw/traits-gcc_4.6.1.erb +226 -0
- data/etc/conf.d/noarch/GNUmakefile.erb +119 -0
- data/etc/conf.d/noarch/adlint_all_bat.erb +9 -0
- data/etc/conf.d/noarch/adlint_all_sh.erb +10 -0
- data/etc/conf.d/noarch/pinit.erb +11 -0
- data/etc/mesg.d/en_US/messages.yml +784 -0
- data/etc/mesg.d/ja_JP/messages.yml +784 -0
- data/lib/adlint/analyzer.rb +294 -0
- data/lib/adlint/c/branch.rb +251 -0
- data/lib/adlint/c/builtin.rb +92 -0
- data/lib/adlint/c/code.rb +490 -0
- data/lib/adlint/c/const.rb +465 -0
- data/lib/adlint/c/conv.rb +212 -0
- data/lib/adlint/c/ctrlexpr.rb +949 -0
- data/lib/adlint/c/domain.rb +7499 -0
- data/lib/adlint/c/environ.rb +133 -0
- data/lib/adlint/c/expr.rb +1725 -0
- data/lib/adlint/c/format.rb +3209 -0
- data/lib/adlint/c/interp.rb +1740 -0
- data/lib/adlint/c/lexer.rb +241 -0
- data/lib/adlint/c/mediator.rb +313 -0
- data/lib/adlint/c/message.rb +13597 -0
- data/lib/adlint/c/metric.rb +765 -0
- data/lib/adlint/c/object.rb +1018 -0
- data/lib/adlint/c/parser.rb +3800 -0
- data/lib/adlint/c/parser.y +2054 -0
- data/lib/adlint/c/phase.rb +712 -0
- data/lib/adlint/c/resolver.rb +270 -0
- data/lib/adlint/c/scanner.rb +248 -0
- data/lib/adlint/c/scope.rb +74 -0
- data/lib/adlint/c/syntax.rb +4279 -0
- data/lib/adlint/c/type.rb +7506 -0
- data/lib/adlint/c/util.rb +91 -0
- data/lib/adlint/c/value.rb +2310 -0
- data/lib/adlint/c.rb +56 -0
- data/lib/adlint/code.rb +500 -0
- data/lib/adlint/cpp/code.rb +189 -0
- data/lib/adlint/cpp/constexpr.rb +721 -0
- data/lib/adlint/cpp/constexpr.y +389 -0
- data/lib/adlint/cpp/eval.rb +1012 -0
- data/lib/adlint/cpp/lexer.rb +860 -0
- data/lib/adlint/cpp/macro.rb +637 -0
- data/lib/adlint/cpp/message.rb +992 -0
- data/lib/adlint/cpp/phase.rb +176 -0
- data/lib/adlint/cpp/scanner.rb +93 -0
- data/lib/adlint/cpp/source.rb +169 -0
- data/lib/adlint/cpp/subst.rb +300 -0
- data/lib/adlint/cpp/syntax.rb +1412 -0
- data/lib/adlint/cpp/util.rb +97 -0
- data/lib/adlint/cpp.rb +43 -0
- data/lib/adlint/driver.rb +147 -0
- data/lib/adlint/error.rb +179 -0
- data/lib/adlint/lang.rb +97 -0
- data/lib/adlint/ld/message.rb +259 -0
- data/lib/adlint/ld/metric.rb +57 -0
- data/lib/adlint/ld/object.rb +542 -0
- data/lib/adlint/ld/phase.rb +193 -0
- data/lib/adlint/ld/typedef.rb +109 -0
- data/lib/adlint/ld/util.rb +88 -0
- data/lib/adlint/ld.rb +37 -0
- data/lib/adlint/lexer.rb +293 -0
- data/lib/adlint/message.rb +368 -0
- data/lib/adlint/metric.rb +805 -0
- data/lib/adlint/monitor.rb +144 -0
- data/lib/adlint/phase.rb +90 -0
- data/lib/adlint/prelude.rb +314 -0
- data/lib/adlint/report.rb +617 -0
- data/lib/adlint/source.rb +155 -0
- data/lib/adlint/symbol.rb +127 -0
- data/lib/adlint/token.rb +215 -0
- data/lib/adlint/traits.rb +643 -0
- data/lib/adlint/util.rb +524 -0
- data/lib/adlint/version.rb +71 -0
- data/lib/adlint.rb +66 -0
- data/share/HEADER +45 -0
- data/share/demo/Makefile +110 -0
- data/share/demo/ambig_operator/ambig_operator.c +289 -0
- data/share/demo/arg_points_unset/arg_points_unset.c +37 -0
- data/share/demo/array_range/array_range.c +62 -0
- data/share/demo/bad_bitfields/bad_bitfields.c +74 -0
- data/share/demo/bad_brace/bad_brace.c +19 -0
- data/share/demo/bad_charset/abcde$.h +0 -0
- data/share/demo/bad_charset/bad_charset.c +22 -0
- data/share/demo/bad_comment/bad_comment.c +3 -0
- data/share/demo/bad_const/bad_const.c +19 -0
- data/share/demo/bad_conv/bad_conv.c +48 -0
- data/share/demo/bad_indent/bad_indent.c +50 -0
- data/share/demo/bad_init/bad_init.c +49 -0
- data/share/demo/bad_macro/bad_macro.c +97 -0
- data/share/demo/bitwise_expr/bitwise_expr.c +19 -0
- data/share/demo/call_by_value/call_by_value.c +26 -0
- data/share/demo/cross_ref/cross_ref.c +21 -0
- data/share/demo/dangling_else/dangling_else.c +20 -0
- data/share/demo/dead_code/dead_code.c +237 -0
- data/share/demo/deep_nest/deep_nest.c +57 -0
- data/share/demo/dense_switch/dense_switch.c +62 -0
- data/share/demo/direct_recur/direct_recur.c +15 -0
- data/share/demo/div_by_zero/div_by_zero.c +35 -0
- data/share/demo/dos_source/dos_source.c +7 -0
- data/share/demo/funptr_cast/funptr_cast.c +26 -0
- data/share/demo/goto_stmt/goto_stmt.c +19 -0
- data/share/demo/id_hiding/id_hiding.c +19 -0
- data/share/demo/ill_defined/ill_defined.c +13 -0
- data/share/demo/implicit_conv/implicit_conv.c +60 -0
- data/share/demo/implicit_int/implicit_int.c +14 -0
- data/share/demo/incomplete_type/incomplete_type.c +49 -0
- data/share/demo/indirect_recur/indirect_recur_1.c +14 -0
- data/share/demo/indirect_recur/indirect_recur_1.h +7 -0
- data/share/demo/indirect_recur/indirect_recur_2.c +12 -0
- data/share/demo/indirect_recur/indirect_recur_2.h +6 -0
- data/share/demo/indirect_recur/indirect_recur_3.c +6 -0
- data/share/demo/indirect_recur/indirect_recur_3.h +6 -0
- data/share/demo/indirect_recur/indirect_recur_4.c +25 -0
- data/share/demo/intro_demo/intro_demo.c +76 -0
- data/share/demo/intro_demo/intro_demo.h +12 -0
- data/share/demo/intro_demo/useless_header.h +5 -0
- data/share/demo/invalid_call/invalid_call.c +32 -0
- data/share/demo/kandr_fundef/kandr_fundef.c +10 -0
- data/share/demo/line_comment/line_comment.c +12 -0
- data/share/demo/local_decl/local_decl.c +9 -0
- data/share/demo/logical_trick/logical_trick.c +36 -0
- data/share/demo/long_sym/long_sym.c +5 -0
- data/share/demo/loop_var/loop_var.c +92 -0
- data/share/demo/malloc_or_die/malloc_or_die.c +43 -0
- data/share/demo/may_be_null/may_be_null.c +52 -0
- data/share/demo/may_be_null_arith/may_be_null_arith.c +15 -0
- data/share/demo/may_be_unset/may_be_unset.c +34 -0
- data/share/demo/mmapped_io/mmapped_io.c +23 -0
- data/share/demo/multi_break/multi_break.c +33 -0
- data/share/demo/multi_decl/multi_decl_1.c +17 -0
- data/share/demo/multi_decl/multi_decl_1.h +6 -0
- data/share/demo/multi_decl/multi_decl_2.c +13 -0
- data/share/demo/multi_decl/multi_decl_2.h +6 -0
- data/share/demo/multi_decl/multi_decl_3.c +22 -0
- data/share/demo/multi_def/multi_def_1.c +36 -0
- data/share/demo/multi_def/multi_def_1.h +6 -0
- data/share/demo/multi_def/multi_def_2.c +22 -0
- data/share/demo/multi_def/multi_def_2.h +6 -0
- data/share/demo/multi_def/multi_def_3.c +6 -0
- data/share/demo/multi_typedef/multi_typedef.c +11 -0
- data/share/demo/multi_typedef/multi_typedef_1.h +1 -0
- data/share/demo/multi_typedef/multi_typedef_2.h +1 -0
- data/share/demo/must_be_false/must_be_false.c +53 -0
- data/share/demo/must_be_null/must_be_null.c +13 -0
- data/share/demo/must_be_null_arith/must_be_null_arith.c +14 -0
- data/share/demo/must_be_true/must_be_true.c +21 -0
- data/share/demo/no_eof_nl/no_eof_nl.c +4 -0
- data/share/demo/no_void_arg/no_void_arg.c +14 -0
- data/share/demo/null_stmt/null_stmt.c +19 -0
- data/share/demo/octal_const/octal_const.c +20 -0
- data/share/demo/output_by_param/output_by_param.c +17 -0
- data/share/demo/overflow/overflow.c +74 -0
- data/share/demo/press_release/press_release.c +40 -0
- data/share/demo/retn_lvar_addr/retn_lvar_addr.c +47 -0
- data/share/demo/shift_expr/shift_expr.c +14 -0
- data/share/demo/should_be_typedef/should_be_typedef.c +51 -0
- data/share/demo/static_paths/static_paths.c +153 -0
- data/share/demo/static_vars/static_vars.c +39 -0
- data/share/demo/tag_hiding/tag_hiding.c +18 -0
- data/share/demo/tricky_incdec/tricky_incdec.c +12 -0
- data/share/demo/undefined_macro/undefined_macro.c +17 -0
- data/share/demo/uninit_vars/uninit_vars.c +28 -0
- data/share/demo/union_type/union_type.c +23 -0
- data/share/demo/unmatch_decl/unmatch_decl_1.c +12 -0
- data/share/demo/unmatch_decl/unmatch_decl_1.h +8 -0
- data/share/demo/unmatch_decl/unmatch_decl_2.c +10 -0
- data/share/demo/unmatch_decl/unmatch_decl_2.h +8 -0
- data/share/demo/unmatch_decl/unmatch_decl_3.c +7 -0
- data/share/demo/unmatch_paren_macro/unmatch_paren_macro.c +15 -0
- data/share/demo/unreachable/unreachable.c +34 -0
- data/share/demo/useless_exp_funs/useless_exp_funs_1.c +14 -0
- data/share/demo/useless_exp_funs/useless_exp_funs_1.h +1 -0
- data/share/demo/useless_exp_funs/useless_exp_funs_2.c +6 -0
- data/share/demo/useless_exp_vars/useless_export_1.c +8 -0
- data/share/demo/useless_exp_vars/useless_export_1.h +1 -0
- data/share/demo/useless_exp_vars/useless_export_2.c +7 -0
- data/share/demo/useless_expr/useless_expr.c +17 -0
- data/share/demo/useless_funs/useless_funs_1.c +21 -0
- data/share/demo/useless_funs/useless_funs_1.h +8 -0
- data/share/demo/useless_funs/useless_funs_2.c +6 -0
- data/share/demo/useless_header/useless_header.c +9 -0
- data/share/demo/useless_header/useless_header_1.h +12 -0
- data/share/demo/useless_header/useless_header_2.h +6 -0
- data/share/demo/useless_header/useless_header_3.h +9 -0
- data/share/demo/useless_header/useless_header_4.h +3 -0
- data/share/demo/useless_vars/useless_vars.c +17 -0
- data/share/demo/va_funcall/va_funcall.c +25 -0
- data/share/demo/various_fundef/various_fundef.c +36 -0
- data/share/demo/wchar_wstring/wchar_wstring.c +7 -0
- data/share/demo/wrap_around/wrap_around.c +38 -0
- data/share/doc/Makefile +16 -0
- data/share/doc/adlint_on_adqua.png +0 -0
- data/share/doc/adlint_on_eclipse_en.png +0 -0
- data/share/doc/adlint_on_eclipse_ja.png +0 -0
- data/share/doc/adlint_on_vim_en.png +0 -0
- data/share/doc/adlint_on_vim_ja.png +0 -0
- data/share/doc/developers_guide_ja.html +171 -0
- data/share/doc/developers_guide_ja.texi +87 -0
- data/share/doc/gen_mesg_sections.rb +39 -0
- data/share/doc/samples/GNUmakefile +162 -0
- data/share/doc/samples/adlint_traits.yml +238 -0
- data/share/doc/texinfo.css +22 -0
- data/share/doc/users_guide_en.html +39975 -0
- data/share/doc/users_guide_en.texi +32640 -0
- data/share/doc/users_guide_ja.html +40505 -0
- data/share/doc/users_guide_ja.texi +33189 -0
- data/share/logo/adlint-110.png +0 -0
- data/share/logo/adlint-524.png +0 -0
- data/share/logo/adlint.svg +4637 -0
- data/share/sample/README +6 -0
- data/share/sample/bison-2.5/adlint/GNUmakefile +170 -0
- data/share/sample/bison-2.5/adlint/adlint_traits.yml +225 -0
- data/share/sample/bison-2.5/adlint/lib/GNUmakefile +198 -0
- data/share/sample/bison-2.5/adlint/lib/adlint_cinit.h +228 -0
- data/share/sample/bison-2.5/adlint/lib/adlint_pinit.h +21 -0
- data/share/sample/bison-2.5/adlint/lib/adlint_traits.yml +238 -0
- data/share/sample/bison-2.5/adlint/src/GNUmakefile +166 -0
- data/share/sample/bison-2.5/adlint/src/adlint_cinit.h +228 -0
- data/share/sample/bison-2.5/adlint/src/adlint_pinit.h +21 -0
- data/share/sample/bison-2.5/adlint/src/adlint_traits.yml +239 -0
- data/share/sample/ctags-5.8/adlint/GNUmakefile +169 -0
- data/share/sample/ctags-5.8/adlint/adlint_cinit.h +219 -0
- data/share/sample/ctags-5.8/adlint/adlint_pinit.h +13 -0
- data/share/sample/ctags-5.8/adlint/adlint_traits.yml +225 -0
- data/share/sample/flex-2.5.35/adlint/GNUmakefile +140 -0
- data/share/sample/flex-2.5.35/adlint/adlint_cinit.h +219 -0
- data/share/sample/flex-2.5.35/adlint/adlint_pinit.h +14 -0
- data/share/sample/flex-2.5.35/adlint/adlint_traits.yml +225 -0
- data/share/sample/ruby-1.9.3-p0/adlint/GNUmakefile +314 -0
- data/share/sample/ruby-1.9.3-p0/adlint/adlint_traits.yml +225 -0
- data/share/sample/ruby-1.9.3-p0/adlint/core/GNUmakefile +204 -0
- data/share/sample/ruby-1.9.3-p0/adlint/core/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/core/adlint_pinit.h +28 -0
- data/share/sample/ruby-1.9.3-p0/adlint/core/adlint_traits.yml +240 -0
- data/share/sample/ruby-1.9.3-p0/adlint/enc/GNUmakefile +163 -0
- data/share/sample/ruby-1.9.3-p0/adlint/enc/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/enc/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/enc/adlint_traits.yml +240 -0
- data/share/sample/ruby-1.9.3-p0/adlint/enc-trans/GNUmakefile +149 -0
- data/share/sample/ruby-1.9.3-p0/adlint/enc-trans/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/enc-trans/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/enc-trans/adlint_traits.yml +240 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-bigdecimal/GNUmakefile +131 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-bigdecimal/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-bigdecimal/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-bigdecimal/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-continuation/GNUmakefile +131 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-continuation/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-continuation/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-continuation/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-coverage/GNUmakefile +131 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-coverage/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-coverage/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-coverage/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-curses/GNUmakefile +131 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-curses/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-curses/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-curses/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-date/GNUmakefile +134 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-date/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-date/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-date/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-dbm/GNUmakefile +131 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-dbm/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-dbm/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-dbm/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest/GNUmakefile +131 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-bubblebabble/GNUmakefile +131 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-bubblebabble/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-bubblebabble/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-bubblebabble/adlint_traits.yml +242 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-md5/GNUmakefile +132 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-md5/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-md5/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-md5/adlint_traits.yml +242 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-rmd160/GNUmakefile +132 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-rmd160/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-rmd160/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-rmd160/adlint_traits.yml +242 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-sha1/GNUmakefile +132 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-sha1/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-sha1/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-sha1/adlint_traits.yml +242 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-sha2/GNUmakefile +132 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-sha2/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-sha2/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-digest-sha2/adlint_traits.yml +242 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-dl/GNUmakefile +134 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-dl/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-dl/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-dl/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-dl-callback/GNUmakefile +140 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-dl-callback/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-dl-callback/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-dl-callback/adlint_traits.yml +242 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-etc/GNUmakefile +131 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-etc/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-etc/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-etc/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-fcntl/GNUmakefile +131 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-fcntl/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-fcntl/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-fcntl/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-fiber/GNUmakefile +131 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-fiber/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-fiber/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-fiber/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-fiddle/GNUmakefile +134 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-fiddle/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-fiddle/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-fiddle/adlint_traits.yml +242 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-gdbm/GNUmakefile +131 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-gdbm/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-gdbm/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-gdbm/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-iconv/GNUmakefile +131 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-iconv/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-iconv/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-iconv/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-io-console/GNUmakefile +131 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-io-console/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-io-console/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-io-console/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-io-nonblock/GNUmakefile +131 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-io-nonblock/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-io-nonblock/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-io-nonblock/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-io-wait/GNUmakefile +131 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-io-wait/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-io-wait/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-io-wait/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-json-generator/GNUmakefile +131 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-json-generator/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-json-generator/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-json-generator/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-json-parser/GNUmakefile +131 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-json-parser/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-json-parser/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-json-parser/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-mathn-complex/GNUmakefile +131 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-mathn-complex/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-mathn-complex/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-mathn-complex/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-mathn-rational/GNUmakefile +131 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-mathn-rational/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-mathn-rational/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-mathn-rational/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-nkf/GNUmakefile +131 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-nkf/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-nkf/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-nkf/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-openssl/GNUmakefile +162 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-openssl/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-openssl/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-openssl/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-pathname/GNUmakefile +131 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-pathname/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-pathname/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-pathname/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-psych/GNUmakefile +135 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-psych/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-psych/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-psych/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-pty/GNUmakefile +131 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-pty/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-pty/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-pty/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-racc-cparse/GNUmakefile +131 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-racc-cparse/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-racc-cparse/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-racc-cparse/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-readline/GNUmakefile +131 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-readline/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-readline/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-readline/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-ripper/GNUmakefile +131 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-ripper/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-ripper/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-ripper/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-sdbm/GNUmakefile +132 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-sdbm/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-sdbm/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-sdbm/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-socket/GNUmakefile +144 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-socket/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-socket/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-socket/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-stringio/GNUmakefile +131 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-stringio/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-stringio/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-stringio/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-strscan/GNUmakefile +131 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-strscan/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-strscan/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-strscan/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-syck/GNUmakefile +140 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-syck/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-syck/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-syck/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-syslog/GNUmakefile +131 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-syslog/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-syslog/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-syslog/adlint_traits.yml +241 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-zlib/GNUmakefile +131 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-zlib/adlint_cinit.h +228 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-zlib/adlint_pinit.h +24 -0
- data/share/sample/ruby-1.9.3-p0/adlint/ext-zlib/adlint_traits.yml +241 -0
- data/share/sample/screen-4.0.3/adlint/GNUmakefile +162 -0
- data/share/sample/screen-4.0.3/adlint/adlint_cinit.h +228 -0
- data/share/sample/screen-4.0.3/adlint/adlint_pinit.h +21 -0
- data/share/sample/screen-4.0.3/adlint/adlint_traits.yml +238 -0
- data/share/sample/vim-7.3/adlint/vim/GNUmakefile +185 -0
- data/share/sample/vim-7.3/adlint/vim/adlint_cinit.h +228 -0
- data/share/sample/vim-7.3/adlint/vim/adlint_pinit.h +25 -0
- data/share/sample/vim-7.3/adlint/vim/adlint_traits.yml +250 -0
- data/share/sample/vim-7.3/adlint/xxd/GNUmakefile +131 -0
- data/share/sample/vim-7.3/adlint/xxd/adlint_cinit.h +228 -0
- data/share/sample/vim-7.3/adlint/xxd/adlint_pinit.h +24 -0
- data/share/sample/vim-7.3/adlint/xxd/adlint_traits.yml +237 -0
- data/share/sample/zsh-4.3.15/adlint/GNUmakefile +146 -0
- data/share/sample/zsh-4.3.15/adlint/adlint_traits.yml +225 -0
- data/share/sample/zsh-4.3.15/adlint/builtins/GNUmakefile +132 -0
- data/share/sample/zsh-4.3.15/adlint/builtins/adlint_cinit.h +228 -0
- data/share/sample/zsh-4.3.15/adlint/builtins/adlint_pinit.h +24 -0
- data/share/sample/zsh-4.3.15/adlint/builtins/adlint_traits.yml +240 -0
- data/share/sample/zsh-4.3.15/adlint/core/GNUmakefile +153 -0
- data/share/sample/zsh-4.3.15/adlint/core/adlint_cinit.h +228 -0
- data/share/sample/zsh-4.3.15/adlint/core/adlint_pinit.h +23 -0
- data/share/sample/zsh-4.3.15/adlint/core/adlint_traits.yml +239 -0
- data/share/sample/zsh-4.3.15/adlint/modules/GNUmakefile +147 -0
- data/share/sample/zsh-4.3.15/adlint/modules/adlint_cinit.h +228 -0
- data/share/sample/zsh-4.3.15/adlint/modules/adlint_pinit.h +24 -0
- data/share/sample/zsh-4.3.15/adlint/modules/adlint_traits.yml +240 -0
- data/share/sample/zsh-4.3.15/adlint/zle/GNUmakefile +144 -0
- data/share/sample/zsh-4.3.15/adlint/zle/adlint_cinit.h +228 -0
- data/share/sample/zsh-4.3.15/adlint/zle/adlint_pinit.h +24 -0
- data/share/sample/zsh-4.3.15/adlint/zle/adlint_traits.yml +239 -0
- data/spec/MUST_WRITE_SPECS_WITH_RSPEC +0 -0
- metadata +532 -0
@@ -0,0 +1,50 @@
|
|
1
|
+
typedef enum { R = 1, G, B } color_t;
|
2
|
+
|
3
|
+
color_t c;
|
4
|
+
|
5
|
+
int main(int argc, char *argv[])
|
6
|
+
{
|
7
|
+
if (argc < 2)
|
8
|
+
exit(1);
|
9
|
+
|
10
|
+
for (int i = 0; i < argc; ++i)
|
11
|
+
puts(argv[i]);
|
12
|
+
|
13
|
+
while (1)
|
14
|
+
puts("hello world\n");
|
15
|
+
|
16
|
+
if (c == 3)
|
17
|
+
for (int i = 0; i < argc; ++i)
|
18
|
+
puts(argv[i]);
|
19
|
+
|
20
|
+
if (argc < 3)
|
21
|
+
exit(1);
|
22
|
+
else
|
23
|
+
do
|
24
|
+
puts("hoge\n");
|
25
|
+
while (rand());
|
26
|
+
|
27
|
+
if (argc < 4)
|
28
|
+
exit(1);
|
29
|
+
else if (rand()) {
|
30
|
+
puts("hogehoge\n");
|
31
|
+
}
|
32
|
+
else
|
33
|
+
if (rand())
|
34
|
+
puts("hogehogehoge\n");
|
35
|
+
|
36
|
+
switch (c) {
|
37
|
+
case R:
|
38
|
+
puts("kldfaj;\n");
|
39
|
+
puts("kldfaj;\n");
|
40
|
+
break;
|
41
|
+
case G:
|
42
|
+
case B:
|
43
|
+
puts("kldfaj;\n");
|
44
|
+
puts("kldfaj;\n");
|
45
|
+
default:
|
46
|
+
puts("kldfaj;\n");
|
47
|
+
}
|
48
|
+
|
49
|
+
return 0;
|
50
|
+
}
|
@@ -0,0 +1,49 @@
|
|
1
|
+
struct Foo {
|
2
|
+
int i;
|
3
|
+
int j;
|
4
|
+
};
|
5
|
+
|
6
|
+
union Bar {
|
7
|
+
int i;
|
8
|
+
long j;
|
9
|
+
};
|
10
|
+
|
11
|
+
static void foo(void)
|
12
|
+
{
|
13
|
+
const struct Foo foo1 = { 1, 2 };
|
14
|
+
const struct Foo foo2 = 1;
|
15
|
+
|
16
|
+
const union Bar bar1 = { 1 };
|
17
|
+
const union Bar bar2 = 1;
|
18
|
+
}
|
19
|
+
|
20
|
+
struct Baz {
|
21
|
+
int i;
|
22
|
+
int a[3];
|
23
|
+
};
|
24
|
+
|
25
|
+
struct Qux {
|
26
|
+
int i;
|
27
|
+
union Bar u;
|
28
|
+
};
|
29
|
+
|
30
|
+
static void bar(void)
|
31
|
+
{
|
32
|
+
const struct Foo foo1[2] = { { 1, 2 }, { 3, 4 } };
|
33
|
+
const struct Foo foo2[2] = { 1, 2, 3, 4 };
|
34
|
+
|
35
|
+
const union Bar bar1 = { 1 };
|
36
|
+
const union Bar bar2 = bar1;
|
37
|
+
const union Bar bar3 = foo1[0];
|
38
|
+
|
39
|
+
const struct Baz baz1 = { 1, { 2, 3 } };
|
40
|
+
const struct Baz baz2 = { 1, 2, 3 };
|
41
|
+
const struct Baz baz3 = baz1;
|
42
|
+
const struct Baz baz4 = foo1[0];
|
43
|
+
|
44
|
+
const struct Qux qux1 = { 1, { 2 } };
|
45
|
+
const struct Qux qux2 = { 1, 2 };
|
46
|
+
|
47
|
+
const int a1[2][2] = { { 1, 2 }, { 3, 4 } };
|
48
|
+
const int a2[2][2] = { 1, 2, 3, 4 };
|
49
|
+
}
|
@@ -0,0 +1,97 @@
|
|
1
|
+
#define FUNC1(x, y) x + y
|
2
|
+
#define FUNC2(x) (x * x)
|
3
|
+
#define FUNC3(x, y) x##y
|
4
|
+
#define FUNC4(x) #x
|
5
|
+
|
6
|
+
#define MANY_PARAMS1(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa,bb,cc,dd,ee) 1
|
7
|
+
|
8
|
+
#define MANY_PARAMS2(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa,bb,cc,dd,ee,ff) 1
|
9
|
+
|
10
|
+
int main(void)
|
11
|
+
{
|
12
|
+
const int i = FUNC1(1, 2);
|
13
|
+
const int j = FUNC2(2);
|
14
|
+
const int k = FUNC3(1, 2);
|
15
|
+
const char * const str = FUNC4(foo);
|
16
|
+
|
17
|
+
const int l = MANY_PARAMS1(1,1,1,1,1,1,1,1,1,1,
|
18
|
+
1,1,1,1,1,1,1,1,1,1,
|
19
|
+
1,1,1,1,1,1,1,1,1,1,
|
20
|
+
1);
|
21
|
+
|
22
|
+
return MANY_PARAMS2(1,1,1,1,1,1,1,1,1,1,
|
23
|
+
1,1,1,1,1,1,1,1,1,1,
|
24
|
+
1,1,1,1,1,1,1,1,1,1,
|
25
|
+
1,1);
|
26
|
+
}
|
27
|
+
|
28
|
+
static int foo(void)
|
29
|
+
{
|
30
|
+
#define FOO (1)
|
31
|
+
const int i = FOO;
|
32
|
+
#undef FOO
|
33
|
+
return i;
|
34
|
+
}
|
35
|
+
|
36
|
+
#define MACRO1 { 0, 1, i }
|
37
|
+
|
38
|
+
#define MACRO2(x) { 0, x, x + 1 }
|
39
|
+
|
40
|
+
#define MACRO3(a, n) { \
|
41
|
+
int j; \
|
42
|
+
for (j = 0; j < n; j++) { \
|
43
|
+
a[j] = j; \
|
44
|
+
} \
|
45
|
+
}
|
46
|
+
|
47
|
+
#define MACRO4(foo) \
|
48
|
+
do { \
|
49
|
+
foo(0); \
|
50
|
+
} while (0)
|
51
|
+
|
52
|
+
#define MACRO5 static const
|
53
|
+
|
54
|
+
#define MACRO6 if (hoge) perror("hoge");
|
55
|
+
|
56
|
+
#define MACRO7 { \
|
57
|
+
for (int i = 0; i < 10; i++) { \
|
58
|
+
puts("hello world\n"); \
|
59
|
+
} \
|
60
|
+
}
|
61
|
+
|
62
|
+
static void bar(int i)
|
63
|
+
{
|
64
|
+
int a1[] = MACRO1;
|
65
|
+
int a2[] = MACRO2(3);
|
66
|
+
|
67
|
+
MACRO3;
|
68
|
+
|
69
|
+
if (i == 0)
|
70
|
+
MACRO4(bar);
|
71
|
+
|
72
|
+
{
|
73
|
+
MACRO5 int hoge;
|
74
|
+
MACRO6
|
75
|
+
}
|
76
|
+
|
77
|
+
MACRO7;
|
78
|
+
}
|
79
|
+
|
80
|
+
#define ADD +
|
81
|
+
#define SUB -
|
82
|
+
#define MUL *
|
83
|
+
#define DIV /
|
84
|
+
#define MOD %
|
85
|
+
|
86
|
+
#define WHILE while
|
87
|
+
#define DO do
|
88
|
+
#define FOR for
|
89
|
+
#define IF if
|
90
|
+
#define ELSE else
|
91
|
+
#define SWITCH switch
|
92
|
+
#define CASE case
|
93
|
+
#define DEFAULT default
|
94
|
+
#define GOTO goto
|
95
|
+
#define RETURN return
|
96
|
+
#define BREAK break
|
97
|
+
#define CONTINUE continue
|
@@ -0,0 +1,19 @@
|
|
1
|
+
static void foo(const int i1, const int i2,
|
2
|
+
const unsigned char uc1, const unsigned char uc2)
|
3
|
+
{
|
4
|
+
int i;
|
5
|
+
|
6
|
+
i = (int) (uc1 & uc2);
|
7
|
+
i = (int) (uc1 | uc2);
|
8
|
+
i = (int) (uc1 ^ uc2);
|
9
|
+
i = (int) ~uc1;
|
10
|
+
i = (int) (uc1 << 1);
|
11
|
+
i = (int) (uc1 >> 1);
|
12
|
+
|
13
|
+
i = i1 & i2;
|
14
|
+
i = i1 | i2;
|
15
|
+
i = i1 ^ i2;
|
16
|
+
i = ~i1;
|
17
|
+
i = i1 << i2;
|
18
|
+
i = i1 >> i2;
|
19
|
+
}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
struct Point {
|
2
|
+
int x;
|
3
|
+
int y;
|
4
|
+
};
|
5
|
+
|
6
|
+
typedef struct {
|
7
|
+
int r;
|
8
|
+
int g;
|
9
|
+
int b;
|
10
|
+
} Color;
|
11
|
+
|
12
|
+
extern void foo(struct Point);
|
13
|
+
extern void bar(int, struct Point);
|
14
|
+
extern void baz(int, Color, int);
|
15
|
+
|
16
|
+
int main(void)
|
17
|
+
{
|
18
|
+
struct Point point = { 1, 2 };
|
19
|
+
Color color = { 0, 1, 2 };
|
20
|
+
|
21
|
+
foo(point);
|
22
|
+
bar(0, point);
|
23
|
+
baz(0, color, 1);
|
24
|
+
|
25
|
+
return 0;
|
26
|
+
}
|
@@ -0,0 +1,237 @@
|
|
1
|
+
extern void exit(int);
|
2
|
+
extern int rand(void);
|
3
|
+
|
4
|
+
static int foo(const int i, int);
|
5
|
+
static int bar(const int i, int j);
|
6
|
+
static int baz(const int, int);
|
7
|
+
static int baz(const int j, int i);
|
8
|
+
|
9
|
+
static int foo(const int i, int)
|
10
|
+
{
|
11
|
+
if (i == 0) {
|
12
|
+
return 0;
|
13
|
+
}
|
14
|
+
else if (i == 1) {
|
15
|
+
exit(1);
|
16
|
+
}
|
17
|
+
else {
|
18
|
+
return 2;
|
19
|
+
}
|
20
|
+
return rand();
|
21
|
+
}
|
22
|
+
|
23
|
+
static int bar(const int i, int j)
|
24
|
+
{
|
25
|
+
if (i < 0) {
|
26
|
+
unsigned short j = foo(1);
|
27
|
+
if (j < i) {
|
28
|
+
abort();
|
29
|
+
}
|
30
|
+
if (i == 0) {
|
31
|
+
abort();
|
32
|
+
}
|
33
|
+
exit(1);
|
34
|
+
}
|
35
|
+
else {
|
36
|
+
if (i == -2) {
|
37
|
+
abort();
|
38
|
+
}
|
39
|
+
}
|
40
|
+
/* i >= 0 */
|
41
|
+
|
42
|
+
if (i < 2) {
|
43
|
+
j = 3 / i; /* i == 0..1 */
|
44
|
+
}
|
45
|
+
|
46
|
+
if (i < 1) {
|
47
|
+
j = 3 / i; /* i == 0 */
|
48
|
+
return j;
|
49
|
+
}
|
50
|
+
|
51
|
+
return 3 / i; /* i == 1 */
|
52
|
+
}
|
53
|
+
|
54
|
+
static int baz(const int i, int j)
|
55
|
+
{
|
56
|
+
if (i < 0) {
|
57
|
+
unsigned short j = foo(1, 2, 3);
|
58
|
+
if (j < i) {
|
59
|
+
abort();
|
60
|
+
}
|
61
|
+
if (i == 0) {
|
62
|
+
abort();
|
63
|
+
}
|
64
|
+
exit(1);
|
65
|
+
}
|
66
|
+
else {
|
67
|
+
if (i == -2) {
|
68
|
+
abort();
|
69
|
+
}
|
70
|
+
}
|
71
|
+
/* i >= 0 */
|
72
|
+
|
73
|
+
if (i < -3) {
|
74
|
+
abort();
|
75
|
+
}
|
76
|
+
|
77
|
+
if (i != 0) {
|
78
|
+
i = 1;
|
79
|
+
}
|
80
|
+
else {
|
81
|
+
return 0;
|
82
|
+
}
|
83
|
+
/* i == 1 */
|
84
|
+
|
85
|
+
if (i < 2) {
|
86
|
+
j = 3 / i;
|
87
|
+
}
|
88
|
+
|
89
|
+
if (i < 1) {
|
90
|
+
j = 3 / i;
|
91
|
+
return j;
|
92
|
+
}
|
93
|
+
|
94
|
+
return 3 / i;
|
95
|
+
}
|
96
|
+
|
97
|
+
static int qux(void)
|
98
|
+
{
|
99
|
+
int i = foo(0);
|
100
|
+
int j;
|
101
|
+
|
102
|
+
if (i < 0) {
|
103
|
+
unsigned short j = foo(1);
|
104
|
+
if (j < i) {
|
105
|
+
abort();
|
106
|
+
}
|
107
|
+
if (i == 0) {
|
108
|
+
abort();
|
109
|
+
}
|
110
|
+
exit(1);
|
111
|
+
}
|
112
|
+
else {
|
113
|
+
if (i == -2) {
|
114
|
+
abort();
|
115
|
+
}
|
116
|
+
}
|
117
|
+
/* i >= 0 */
|
118
|
+
|
119
|
+
if (i == 0) {
|
120
|
+
i = 1;
|
121
|
+
}
|
122
|
+
else if (i == 1) {
|
123
|
+
i = 2;
|
124
|
+
}
|
125
|
+
/* i >= 1 */
|
126
|
+
|
127
|
+
if (i < 2) {
|
128
|
+
j = 3 / i;
|
129
|
+
}
|
130
|
+
|
131
|
+
if (i < 1) {
|
132
|
+
j = 3 / i;
|
133
|
+
return j;
|
134
|
+
}
|
135
|
+
|
136
|
+
return 3 / i;
|
137
|
+
}
|
138
|
+
|
139
|
+
static int foobar(void)
|
140
|
+
{
|
141
|
+
int i;
|
142
|
+
|
143
|
+
if (1) {
|
144
|
+
i = foo(0);
|
145
|
+
}
|
146
|
+
|
147
|
+
if (0) {
|
148
|
+
return i;
|
149
|
+
}
|
150
|
+
|
151
|
+
if (1) {
|
152
|
+
i = foo(0);
|
153
|
+
}
|
154
|
+
else {
|
155
|
+
__adlint__eval("puts 'NOTREACHED'");
|
156
|
+
return 0;
|
157
|
+
}
|
158
|
+
|
159
|
+
if (0) {
|
160
|
+
__adlint__eval("puts 'NOTREACHED'");
|
161
|
+
return 0;
|
162
|
+
}
|
163
|
+
else {
|
164
|
+
i = foo(0);
|
165
|
+
}
|
166
|
+
|
167
|
+
do {
|
168
|
+
i = 0;
|
169
|
+
} while(0);
|
170
|
+
|
171
|
+
switch (i) {
|
172
|
+
case 0:
|
173
|
+
for (;;) {
|
174
|
+
i = 0;
|
175
|
+
}
|
176
|
+
break;
|
177
|
+
default:
|
178
|
+
i = 1;
|
179
|
+
}
|
180
|
+
|
181
|
+
return 3 / i;
|
182
|
+
}
|
183
|
+
|
184
|
+
int (*p)(const int j, int i) = &foo;
|
185
|
+
|
186
|
+
int main(void)
|
187
|
+
{
|
188
|
+
int i = foo(0);
|
189
|
+
int j;
|
190
|
+
int (*p)(const int x, int y) = bar;
|
191
|
+
|
192
|
+
p = baz;
|
193
|
+
|
194
|
+
if (i < 0) {
|
195
|
+
return 0;
|
196
|
+
}
|
197
|
+
|
198
|
+
if (i != 0) {
|
199
|
+
i = 1;
|
200
|
+
}
|
201
|
+
else {
|
202
|
+
return 0;
|
203
|
+
}
|
204
|
+
/* i == 1 */
|
205
|
+
|
206
|
+
if (i < 2) {
|
207
|
+
j = 3 / i;
|
208
|
+
}
|
209
|
+
|
210
|
+
if (i < 1) {
|
211
|
+
return 3 / i;
|
212
|
+
}
|
213
|
+
|
214
|
+
i = foo(0);
|
215
|
+
|
216
|
+
switch (i) {
|
217
|
+
case 0:
|
218
|
+
return 1;
|
219
|
+
case 1:
|
220
|
+
return 2;
|
221
|
+
case 2:
|
222
|
+
case 3:
|
223
|
+
return 3;
|
224
|
+
default:
|
225
|
+
return 4;
|
226
|
+
break;
|
227
|
+
}
|
228
|
+
|
229
|
+
if (i == 4) {
|
230
|
+
return 5;
|
231
|
+
}
|
232
|
+
else {
|
233
|
+
return 6;
|
234
|
+
}
|
235
|
+
|
236
|
+
return 0;
|
237
|
+
}
|
@@ -0,0 +1,57 @@
|
|
1
|
+
int main(void)
|
2
|
+
{
|
3
|
+
if (1) {
|
4
|
+
if (1) {
|
5
|
+
if (1) {
|
6
|
+
if (1) {
|
7
|
+
if (1) {
|
8
|
+
if (1) {
|
9
|
+
if (1) {
|
10
|
+
if (1) {
|
11
|
+
if (1) {
|
12
|
+
if (1) { /*10*/
|
13
|
+
if (1) {
|
14
|
+
if (1) {
|
15
|
+
if (1) {
|
16
|
+
if (1) {
|
17
|
+
if (1) { /*15*/
|
18
|
+
}}}}}}}}}}}}}}}
|
19
|
+
|
20
|
+
if (1) {
|
21
|
+
if (1) {
|
22
|
+
if (1) {
|
23
|
+
if (1) {
|
24
|
+
if (1) {
|
25
|
+
if (1) {
|
26
|
+
if (1) {
|
27
|
+
if (1) {
|
28
|
+
if (1) {
|
29
|
+
if (1) { /*10*/
|
30
|
+
if (1) {
|
31
|
+
if (1) {
|
32
|
+
if (1) {
|
33
|
+
if (1) {
|
34
|
+
if (1) { /*15*/
|
35
|
+
if (1) {
|
36
|
+
}}}}}}}}}}}}}}}}
|
37
|
+
|
38
|
+
if (1)
|
39
|
+
if (1)
|
40
|
+
if (1)
|
41
|
+
if (1)
|
42
|
+
if (1)
|
43
|
+
if (1)
|
44
|
+
if (1)
|
45
|
+
if (1)
|
46
|
+
if (1)
|
47
|
+
if (1) /*10*/
|
48
|
+
if (1)
|
49
|
+
if (1)
|
50
|
+
if (1)
|
51
|
+
if (1)
|
52
|
+
if (1)/*15*/
|
53
|
+
if (1)
|
54
|
+
;
|
55
|
+
|
56
|
+
return 0;
|
57
|
+
}
|
@@ -0,0 +1,62 @@
|
|
1
|
+
int main(void)
|
2
|
+
{
|
3
|
+
const int i = rand();
|
4
|
+
int j;
|
5
|
+
|
6
|
+
switch (i) {
|
7
|
+
case 0:
|
8
|
+
j = 3 / i;
|
9
|
+
case 1:
|
10
|
+
j = 3 / i;
|
11
|
+
if (i == 0)
|
12
|
+
case 3: j = 3 / i;
|
13
|
+
if (i == 0 || i == 1) {
|
14
|
+
case 2: j = 3 / i;
|
15
|
+
}
|
16
|
+
else {
|
17
|
+
__adlint__inspect(i);
|
18
|
+
j = 3 / i;
|
19
|
+
}
|
20
|
+
switch (i) {
|
21
|
+
default:
|
22
|
+
j = 3 / i;
|
23
|
+
break;
|
24
|
+
case 0:
|
25
|
+
j = 3 / i;
|
26
|
+
case 1:
|
27
|
+
j = 3 / i;
|
28
|
+
}
|
29
|
+
break;
|
30
|
+
default:
|
31
|
+
j = 3 / i;
|
32
|
+
}
|
33
|
+
|
34
|
+
switch (i) {
|
35
|
+
case 0:
|
36
|
+
if (i < j) {
|
37
|
+
break;
|
38
|
+
}
|
39
|
+
while (i > j) {
|
40
|
+
break;
|
41
|
+
}
|
42
|
+
j += i;
|
43
|
+
break;
|
44
|
+
default:
|
45
|
+
switch (i) {
|
46
|
+
default:
|
47
|
+
j = 3 / i;
|
48
|
+
break;
|
49
|
+
case 1:
|
50
|
+
if (i < j) {
|
51
|
+
break;
|
52
|
+
}
|
53
|
+
if (i < j + 1) {
|
54
|
+
break;
|
55
|
+
}
|
56
|
+
j += i;
|
57
|
+
break;
|
58
|
+
}
|
59
|
+
}
|
60
|
+
|
61
|
+
return j;
|
62
|
+
}
|
@@ -0,0 +1,35 @@
|
|
1
|
+
extern int rand(void);
|
2
|
+
|
3
|
+
int foo(void)
|
4
|
+
{
|
5
|
+
const int i = rand();
|
6
|
+
|
7
|
+
return 3 / i; /* div by 0 when rand() returns 0 */
|
8
|
+
}
|
9
|
+
|
10
|
+
int bar(const int n)
|
11
|
+
{
|
12
|
+
int c;
|
13
|
+
int i = 1;
|
14
|
+
|
15
|
+
for (c = 0; c < n; ++c) {
|
16
|
+
i = c;
|
17
|
+
}
|
18
|
+
|
19
|
+
i = 3 / i; /* div by zero when 1 is passed as parameter n */
|
20
|
+
|
21
|
+
for (c = 0; c < n; ++c) {
|
22
|
+
if (c % 2 == 0) {
|
23
|
+
i = 0;
|
24
|
+
}
|
25
|
+
}
|
26
|
+
|
27
|
+
i = 3 / i; /* div by zero when 1 is passed as parameter n */
|
28
|
+
|
29
|
+
if (i == 0) {
|
30
|
+
return 0;
|
31
|
+
}
|
32
|
+
else {
|
33
|
+
return 3 / i; /* i must not be 0 in this path */
|
34
|
+
}
|
35
|
+
}
|