adlint 1.16.0 → 1.18.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (83) hide show
  1. data/ChangeLog +471 -0
  2. data/MANIFEST +35 -8
  3. data/NEWS +50 -4
  4. data/bin/adlint +7 -7
  5. data/bin/adlint_chk +7 -7
  6. data/bin/adlint_cma +7 -7
  7. data/bin/adlint_sma +7 -7
  8. data/bin/adlintize +5 -5
  9. data/etc/mesg.d/en_US/messages.yml +3 -3
  10. data/etc/mesg.d/ja_JP/messages.yml +3 -3
  11. data/features/message_detection/E0013.feature +34 -0
  12. data/features/message_detection/W0007.feature +2 -0
  13. data/features/message_detection/W0583.feature +1 -2
  14. data/features/message_detection/W0641.feature +132 -0
  15. data/features/message_detection/W0643.feature +1 -1
  16. data/features/message_detection/W0644.feature +529 -0
  17. data/features/message_detection/W0645.feature +1 -1
  18. data/features/message_detection/W0649.feature +277 -0
  19. data/features/message_detection/W0650.feature +208 -0
  20. data/features/message_detection/W0697.feature +6 -0
  21. data/features/message_detection/W0705.feature +350 -0
  22. data/features/message_detection/W0707.feature +223 -0
  23. data/features/message_detection/W0711.feature +113 -0
  24. data/features/message_detection/W0712.feature +113 -0
  25. data/features/message_detection/W0713.feature +110 -0
  26. data/features/message_detection/W0714.feature +118 -0
  27. data/features/message_detection/W0715.feature +118 -0
  28. data/features/message_detection/W0716.feature +1 -0
  29. data/features/message_detection/W0717.feature +1 -0
  30. data/features/message_detection/W0718.feature +1 -0
  31. data/features/message_detection/W0719.feature +154 -0
  32. data/features/message_detection/W0723.feature +1 -2
  33. data/features/message_detection/W0732.feature +3 -0
  34. data/features/message_detection/W0733.feature +3 -0
  35. data/features/message_detection/W0734.feature +4 -0
  36. data/features/message_detection/W0735.feature +4 -0
  37. data/features/message_detection/W0745.feature +132 -0
  38. data/features/message_detection/W0780.feature +68 -0
  39. data/features/message_detection/W0783.feature +95 -0
  40. data/features/message_detection/W0792.feature +124 -0
  41. data/features/message_detection/W0793.feature +153 -0
  42. data/features/message_detection/W0794.feature +90 -0
  43. data/features/message_detection/W0830.feature +65 -0
  44. data/features/message_detection/W0833.feature +220 -0
  45. data/features/message_detection/W0834.feature +189 -0
  46. data/features/message_detection/W1026.feature +105 -0
  47. data/features/message_detection/W1031.feature +17 -34
  48. data/features/message_detection/W1039.feature +268 -0
  49. data/features/message_detection/W1047.feature +163 -0
  50. data/features/message_detection/W1066.feature +1 -0
  51. data/features/message_detection/W1067.feature +1 -0
  52. data/features/message_detection/W1068.feature +1 -0
  53. data/features/message_detection/W1069.feature +5 -0
  54. data/features/message_detection/W1070.feature +5 -0
  55. data/features/message_detection/W1071.feature +83 -0
  56. data/features/message_detection/W1073.feature +3 -2
  57. data/features/message_detection/W9003.feature +7 -12
  58. data/features/step_definitions/message_detection_steps.rb +4 -31
  59. data/features/support/env.rb +117 -2
  60. data/lib/adlint/c/branch.rb +0 -2
  61. data/lib/adlint/c/ctrlexpr.rb +33 -0
  62. data/lib/adlint/c/expr.rb +119 -31
  63. data/lib/adlint/c/interp.rb +44 -3
  64. data/lib/adlint/c/message.rb +1411 -29
  65. data/lib/adlint/c/object.rb +16 -2
  66. data/lib/adlint/c/option.rb +1 -0
  67. data/lib/adlint/c/parser.rb +101 -100
  68. data/lib/adlint/c/parser.y +3 -2
  69. data/lib/adlint/c/phase.rb +18 -0
  70. data/lib/adlint/c/resolver.rb +23 -0
  71. data/lib/adlint/c/syntax.rb +90 -4
  72. data/lib/adlint/c/type.rb +177 -110
  73. data/lib/adlint/cpp/macro.rb +4 -4
  74. data/lib/adlint/version.rb +2 -2
  75. data/share/demo/bad_include/test/"1/".h +0 -0
  76. data/share/doc/developers_guide_ja.html +3 -3
  77. data/share/doc/developers_guide_ja.texi +1 -1
  78. data/share/doc/users_guide_en.html +467 -506
  79. data/share/doc/users_guide_en.texi +95 -125
  80. data/share/doc/users_guide_ja.html +471 -518
  81. data/share/doc/users_guide_ja.texi +95 -133
  82. data/spec/spec_helper.rb +6 -0
  83. metadata +37 -10
@@ -2,7 +2,7 @@
2
2
  @setfilename users_guide_ja.info
3
3
  @documentlanguage ja
4
4
  @documentencoding utf-8
5
- @settitle AdLint 1.16.0 利用者ガイド
5
+ @settitle AdLint 1.18.0 利用者ガイド
6
6
 
7
7
  @copying
8
8
  Copyright (C) 2010-2012, OGIS-RI Co.,Ltd.
@@ -2853,12 +2853,11 @@ context_line
2853
2853
  * W1035::`%s' は typedef として宣言されています。明示的な型指定子を使わずに、より内側のスコープで再宣言することはできません。
2854
2854
  * W1036::`%s' は typedef として宣言されています。明示的な型指定子を使わずに、構造体または共用体のメンバとして再宣言することはできません。
2855
2855
  * W1037::外部結合をもつ `%s' が、二つ以上宣言されていますが互換性がありません。
2856
- * W1039::変換指定子に `ll' が使われています。
2856
+ * W1039::%s 番目の変換指定子に `ll' が使われています。
2857
2857
  * W1040::前処理指令の後に認識できない文字列が記述されています。
2858
2858
  * W1041::`%s' は、ISO C 標準規格の正式な前処理指令ではありません。
2859
2859
  * W1042::前処理指令の中で sizeof 演算子を使っています。これは言語拡張です。
2860
2860
  * W1043::`@@ address' は、ISO C 標準規格ではサポートされていません。言語拡張と見なします。
2861
- * W1044::文を包含する式は ISO C 標準規格ではサポートされていません。言語拡張と見なします。
2862
2861
  * W1045::この `@@ word' 構文は無視されます。
2863
2862
  * W1046::`\' と改行の間にある空白文字類が無視されています。
2864
2863
  * W1047::構造体、共用体、あるいは配列の初期化子がリテラルではありません。
@@ -26543,15 +26542,15 @@ fscanf(stdin, "%d", a); /* W0640 */
26543
26542
 
26544
26543
  @subsection 内容
26545
26544
 
26546
- @b{このメッセージは AdLint 2.0.0 で出力する予定です。}
26547
-
26548
26545
  このようなキャストは未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。
26549
26546
 
26550
26547
  @subsection サンプルコード
26551
26548
 
26552
- @c{未実装}
26553
26549
  @verbatim
26554
- /* 追記予定 */
26550
+ int *foo(const float f)
26551
+ {
26552
+ return (int *) f; /* W0641 */
26553
+ }
26555
26554
  @end verbatim
26556
26555
 
26557
26556
  @subsection 関連メッセージ
@@ -26560,7 +26559,7 @@ fscanf(stdin, "%d", a); /* W0640 */
26560
26559
 
26561
26560
  @subsection 対応バージョン
26562
26561
 
26563
- 2.0.0 の予定
26562
+ 1.18.0
26564
26563
 
26565
26564
  @node W0642
26566
26565
  @section W0642
@@ -26641,17 +26640,16 @@ void 式の値を使用しようとしています。void 式は値をもちま
26641
26640
 
26642
26641
  @subsection 内容
26643
26642
 
26644
- @b{このメッセージは AdLint 2.0.0 で出力する予定です。}
26645
-
26646
26643
  未定義の動作のため、予期しない動作を引き起こす可能性があります。
26647
26644
 
26648
26645
  @subsection サンプルコード
26649
26646
 
26650
26647
  @verbatim
26651
- extern void func(void);
26648
+ extern void foo(void);
26652
26649
 
26653
- if(func() == 0) { /* W0644 */
26654
- ...snip...
26650
+ int bar(void)
26651
+ {
26652
+ return (int) foo(); /* W0644 */
26655
26653
  }
26656
26654
  @end verbatim
26657
26655
 
@@ -26666,7 +26664,7 @@ if(func() == 0) { /* W0644 */
26666
26664
 
26667
26665
  @subsection 対応バージョン
26668
26666
 
26669
- 2.0.0 の予定
26667
+ 1.18.0
26670
26668
 
26671
26669
  @node W0645
26672
26670
  @section W0645
@@ -26743,15 +26741,15 @@ static const char *str = "foo" L"bar"; /* W0646 */
26743
26741
 
26744
26742
  @subsection 内容
26745
26743
 
26746
- @b{このメッセージは AdLint 2.0.0 で出力する予定です。}
26747
-
26748
26744
  このようなシフト演算は未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。
26749
26745
 
26750
26746
  @subsection サンプルコード
26751
26747
 
26752
26748
  @verbatim
26753
- short a; /* 16bit */
26754
- a <<= -4; /* W0649 */
26749
+ int foo(int i)
26750
+ {
26751
+ return i << -1; /* W0649 */
26752
+ }
26755
26753
  @end verbatim
26756
26754
 
26757
26755
  @subsection 関連メッセージ
@@ -26762,7 +26760,7 @@ a <<= -4; /* W0649 */
26762
26760
 
26763
26761
  @subsection 対応バージョン
26764
26762
 
26765
- 2.0.0 の予定
26763
+ 1.18.0
26766
26764
 
26767
26765
  @node W0650
26768
26766
  @section W0650
@@ -26774,15 +26772,15 @@ a <<= -4; /* W0649 */
26774
26772
 
26775
26773
  @subsection 内容
26776
26774
 
26777
- @b{このメッセージは AdLint 2.0.0 で出力する予定です。}
26778
-
26779
26775
  このようなシフト演算は未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。
26780
26776
 
26781
26777
  @subsection サンプルコード
26782
26778
 
26783
26779
  @verbatim
26784
- char b; /* 8bit */
26785
- a = b << 16; /* W0650 */
26780
+ unsigned int foo(unsigned int i)
26781
+ {
26782
+ return i << 32; /* W0650 */
26783
+ }
26786
26784
  @end verbatim
26787
26785
 
26788
26786
  @subsection 関連メッセージ
@@ -26793,7 +26791,7 @@ a = b << 16; /* W0650 */
26793
26791
 
26794
26792
  @subsection 対応バージョン
26795
26793
 
26796
- 2.0.0 の予定
26794
+ 1.18.0
26797
26795
 
26798
26796
  @node W0653
26799
26797
  @section W0653
@@ -29416,16 +29414,18 @@ void func(unsigned int a)
29416
29414
 
29417
29415
  @subsection 内容
29418
29416
 
29419
- @b{このメッセージは AdLint 2.0.0 で出力する予定です。}
29420
-
29421
29417
  配列の領域外にアクセスする動作は未定義の動作になります。したがって予期しない動作を引き起こす可能性があります。
29422
29418
 
29423
29419
  @subsection サンプルコード
29424
29420
 
29425
29421
  @verbatim
29426
- int arr[10];
29422
+ extern int a[5];
29427
29423
 
29428
- arr[15] = 0; /* W0707 */
29424
+ int foo(void)
29425
+ {
29426
+ int i = a[5]; /* W0707 */
29427
+ return i;
29428
+ }
29429
29429
  @end verbatim
29430
29430
 
29431
29431
  @subsection 関連メッセージ
@@ -29434,7 +29434,7 @@ arr[15] = 0; /* W0707 */
29434
29434
 
29435
29435
  @subsection 対応バージョン
29436
29436
 
29437
- 2.0.0 の予定
29437
+ 1.18.0
29438
29438
 
29439
29439
  @node W0708
29440
29440
  @section W0708
@@ -29745,8 +29745,6 @@ int func(int a, int b, int c)
29745
29745
 
29746
29746
  @subsection 内容
29747
29747
 
29748
- @b{このメッセージは AdLint 2.0.0 で出力する予定です。}
29749
-
29750
29748
  このようなシフト演算は汎整数拡張後の型の範囲を超えていないため、
29751
29749
  未定義の動作にはなりませんが、
29752
29750
  汎整数拡張が生じない型の変数への代入に変更した時点で未定義の動作になりますので、
@@ -29755,8 +29753,10 @@ int func(int a, int b, int c)
29755
29753
  @subsection サンプルコード
29756
29754
 
29757
29755
  @verbatim
29758
- unsigned char uc;
29759
- unsigned int ui = uc >> 8; /* W0719 */
29756
+ int foo(char c)
29757
+ {
29758
+ return c << 31; /* W0719 */
29759
+ }
29760
29760
  @end verbatim
29761
29761
 
29762
29762
  @subsection 関連メッセージ
@@ -29765,7 +29765,7 @@ unsigned int ui = uc >> 8; /* W0719 */
29765
29765
 
29766
29766
  @subsection 対応バージョン
29767
29767
 
29768
- 2.0.0 の予定
29768
+ 1.18.0
29769
29769
 
29770
29770
  @node W0720
29771
29771
  @section W0720
@@ -32079,15 +32079,16 @@ void func(double a, double b)
32079
32079
 
32080
32080
  @subsection 内容
32081
32081
 
32082
- @b{このメッセージは AdLint 2.0.0 で出力する予定です。}
32083
-
32084
32082
  シフト演算の結果として上位ビットの情報が欠落してしまいます。
32085
32083
  これが意図通りであれば問題ありませんが、意図通りでない場合は、不具合の原因になる可能性があります。
32086
32084
 
32087
32085
  @subsection サンプルコード
32088
32086
 
32089
32087
  @verbatim
32090
- unsigned int ui = 0x0F000000U << 8; /* W0780 */
32088
+ unsigned int foo(void)
32089
+ {
32090
+ return 0x08000000U << 5; /* W0780 */
32091
+ }
32091
32092
  @end verbatim
32092
32093
 
32093
32094
  @subsection 関連メッセージ
@@ -32096,7 +32097,7 @@ unsigned int ui = 0x0F000000U << 8; /* W0780 */
32096
32097
 
32097
32098
  @subsection 対応バージョン
32098
32099
 
32099
- 2.0.0 の予定
32100
+ 1.18.0
32100
32101
 
32101
32102
  @node W0781
32102
32103
  @section W0781
@@ -32162,15 +32163,17 @@ int foo(const int i)
32162
32163
 
32163
32164
  @subsection 内容
32164
32165
 
32165
- @b{このメッセージは AdLint 2.0.0 で出力する予定です。}
32166
-
32167
32166
  完全型から不完全型へのキャストは ISO C90 で未定義なので、予期しない動作を引き起こす可能性があります。
32168
32167
 
32169
32168
  @subsection サンプルコード
32170
32169
 
32171
- @c{未実装}
32172
32170
  @verbatim
32173
- /* 追記予定 */
32171
+ extern struct Foo *gp;
32172
+
32173
+ void foo(int *p)
32174
+ {
32175
+ gp = (struct Foo *) p; /* W0783 */
32176
+ }
32174
32177
  @end verbatim
32175
32178
 
32176
32179
  @subsection 関連メッセージ
@@ -32179,7 +32182,7 @@ int foo(const int i)
32179
32182
 
32180
32183
  @subsection 対応バージョン
32181
32184
 
32182
- 2.0.0 の予定
32185
+ 1.18.0
32183
32186
 
32184
32187
  @node W0784
32185
32188
  @section W0784
@@ -32491,15 +32494,15 @@ int a = 1; /* W0791 */
32491
32494
 
32492
32495
  @subsection 内容
32493
32496
 
32494
- @b{このメッセージは AdLint 2.0.0 で出力する予定です。}
32495
-
32496
32497
  関数ポインタから浮動小数点型へのキャスト、またはその逆のキャストは未定義の動作になります。従って、予期しない動作を引き起こす可能性があります。
32497
32498
 
32498
32499
  @subsection サンプルコード
32499
32500
 
32500
- @c{未実装}
32501
32501
  @verbatim
32502
- /* 追記予定 */
32502
+ int (*foo(const float f))(void)
32503
+ {
32504
+ return (int (*)(void)) f; /* W0792 */
32505
+ }
32503
32506
  @end verbatim
32504
32507
 
32505
32508
  @subsection 関連メッセージ
@@ -32508,7 +32511,7 @@ int a = 1; /* W0791 */
32508
32511
 
32509
32512
  @subsection 対応バージョン
32510
32513
 
32511
- 2.0.0 の予定
32514
+ 1.18.0
32512
32515
 
32513
32516
  @node W0793
32514
32517
  @section W0793
@@ -32520,16 +32523,18 @@ int a = 1; /* W0791 */
32520
32523
 
32521
32524
  @subsection 内容
32522
32525
 
32523
- @b{このメッセージは AdLint 2.0.0 で出力する予定です。}
32524
-
32525
32526
  オブジェクトを指すポインタから関数ポインタへのキャスト、またはその逆の黄やストは未定義の動作になります。
32526
32527
  従って、予期しない動作を引き起こす可能性があります。
32527
32528
 
32528
32529
  @subsection サンプルコード
32529
32530
 
32530
- @c{未実装}
32531
32531
  @verbatim
32532
- /* 追記予定 */
32532
+ typedef int (*funptr_t)(void);
32533
+
32534
+ funptr_t foo(float *p)
32535
+ {
32536
+ return (funptr_t) p; /* W0793 */
32537
+ }
32533
32538
  @end verbatim
32534
32539
 
32535
32540
  @subsection 関連メッセージ
@@ -32538,7 +32543,7 @@ int a = 1; /* W0791 */
32538
32543
 
32539
32544
  @subsection 対応バージョン
32540
32545
 
32541
- 2.0.0 の予定
32546
+ 1.18.0
32542
32547
 
32543
32548
  @node W0794
32544
32549
  @section W0794
@@ -32550,16 +32555,16 @@ int a = 1; /* W0791 */
32550
32555
 
32551
32556
  @subsection 内容
32552
32557
 
32553
- @b{このメッセージは AdLint 2.0.0 で出力する予定です。}
32554
-
32555
32558
  整数の負の値をどのように表現するかは規格で定義されているわけではありません。
32556
32559
  従って、符号付き型の値に対して左シフト演算をした結果は、コンパイラに依存することになり、移植性が低下します。
32557
32560
 
32558
32561
  @subsection サンプルコード
32559
32562
 
32560
32563
  @verbatim
32561
- int a = 0x40000000;
32562
- a <<= 3; /* W0794 */
32564
+ int func(int i)
32565
+ {
32566
+ return i << 1; /* W0794 */
32567
+ }
32563
32568
  @end verbatim
32564
32569
 
32565
32570
  @subsection 関連メッセージ
@@ -32568,7 +32573,7 @@ a <<= 3; /* W0794 */
32568
32573
 
32569
32574
  @subsection 対応バージョン
32570
32575
 
32571
- 2.0.0 の予定
32576
+ 1.18.0
32572
32577
 
32573
32578
  @node W0795
32574
32579
  @section W0795
@@ -33212,18 +33217,12 @@ int b[3][2] = { 1, 2, 3, 4, 5, 6 }; /* W0828 */
33212
33217
 
33213
33218
  @subsection 内容
33214
33219
 
33215
- @b{このメッセージは AdLint 2.0.0 で出力する予定です。}
33216
-
33217
33220
  このような記述は、言語拡張に該当するため、移植性を低下させます。
33218
33221
 
33219
33222
  @subsection サンプルコード
33220
33223
 
33221
33224
  @verbatim
33222
- enum COLOR {
33223
- RED,
33224
- BLUE,
33225
- GREEN, /* W0830 */
33226
- };
33225
+ enum Color { Red, Green, Blue, }; /* W0830 */
33227
33226
  @end verbatim
33228
33227
 
33229
33228
  @subsection 関連メッセージ
@@ -33232,7 +33231,7 @@ enum COLOR {
33232
33231
 
33233
33232
  @subsection 対応バージョン
33234
33233
 
33235
- 2.0.0 の予定
33234
+ 1.18.0
33236
33235
 
33237
33236
  @node W0831
33238
33237
  @section W0831
@@ -33322,14 +33321,12 @@ void foo(int arg1, int *arg2, int arg3)
33322
33321
 
33323
33322
  @subsection 内容
33324
33323
 
33325
- @b{このメッセージは AdLint 2.0.0 で出力する予定です。}
33326
-
33327
33324
  接尾語 @code{LL} は、言語拡張に該当するため、移植性を低下させます。
33328
33325
 
33329
33326
  @subsection サンプルコード
33330
33327
 
33331
33328
  @verbatim
33332
- long long int a = 0LL; /* W0833 */
33329
+ long long ll = 123LL; /* W0833 */
33333
33330
  @end verbatim
33334
33331
 
33335
33332
  @subsection 関連メッセージ
@@ -33340,7 +33337,7 @@ long long int a = 0LL; /* W0833 */
33340
33337
 
33341
33338
  @subsection 対応バージョン
33342
33339
 
33343
- 2.0.0 の予定
33340
+ 1.18.0
33344
33341
 
33345
33342
  @node W0834
33346
33343
  @section W0834
@@ -33352,14 +33349,12 @@ long long 型を使っています。
33352
33349
 
33353
33350
  @subsection 内容
33354
33351
 
33355
- @b{このメッセージは AdLint 2.0.0 で出力する予定です。}
33356
-
33357
33352
  @code{long long} 型は、言語拡張に該当するため、移植性を低下させます。
33358
33353
 
33359
33354
  @subsection サンプルコード
33360
33355
 
33361
33356
  @verbatim
33362
- long long a = 0; /* W0834 */
33357
+ extern long long ll; /* W0834 */
33363
33358
  @end verbatim
33364
33359
 
33365
33360
  @subsection 関連メッセージ
@@ -33370,7 +33365,7 @@ long long a = 0; /* W0834 */
33370
33365
 
33371
33366
  @subsection 対応バージョン
33372
33367
 
33373
- 2.0.0 の予定
33368
+ 1.18.0
33374
33369
 
33375
33370
  @node W0835
33376
33371
  @section W0835
@@ -33535,15 +33530,18 @@ int a[10]; /* W0950 */
33535
33530
 
33536
33531
  @subsection 内容
33537
33532
 
33538
- @b{このメッセージは AdLint 2.0.0 で出力する予定です。}
33539
-
33540
33533
  不完全型の構造体や配列を仮引数にしています。関数の全ての仮引数はオブジェクト型の式である必要があります。
33541
33534
 
33542
33535
  @subsection サンプルコード
33543
33536
 
33544
- @c{未実装}
33545
33537
  @verbatim
33546
- /* 追記予定 */
33538
+ extern struct st s;
33539
+ extern void foo(struct st);
33540
+
33541
+ void bar(void)
33542
+ {
33543
+ foo(s); /* W1026 */
33544
+ }
33547
33545
  @end verbatim
33548
33546
 
33549
33547
  @subsection 関連メッセージ
@@ -33552,7 +33550,7 @@ int a[10]; /* W0950 */
33552
33550
 
33553
33551
  @subsection 対応バージョン
33554
33552
 
33555
- 2.0.0 の予定
33553
+ 1.18.0
33556
33554
 
33557
33555
  @node W1027
33558
33556
  @section W1027
@@ -33916,19 +33914,21 @@ extern long a; /* W1037 */
33916
33914
 
33917
33915
  @subsection メッセージ本文
33918
33916
 
33919
- 変換指定子に `ll' が使われています。
33917
+ %s 番目の指定子に `ll' が使われています。
33920
33918
 
33921
33919
  @subsection 内容
33922
33920
 
33923
- @b{このメッセージは AdLint 2.0.0 で出力する予定です。}
33924
-
33925
33921
  '@code{ll}' を変換指定子に使用しています。このような記述は ISO C90 では認められていません。
33926
33922
 
33927
33923
  @subsection サンプルコード
33928
33924
 
33929
- @c{未実装}
33930
33925
  @verbatim
33931
- /* 追記予定 */
33926
+ extern int printf(const char *, ...);
33927
+
33928
+ void foo(long long ll)
33929
+ {
33930
+ printf("%lld", ll); /* W1039 */
33931
+ }
33932
33932
  @end verbatim
33933
33933
 
33934
33934
  @subsection 関連メッセージ
@@ -33937,7 +33937,7 @@ extern long a; /* W1037 */
33937
33937
 
33938
33938
  @subsection 対応バージョン
33939
33939
 
33940
- 2.0.0 の予定
33940
+ 1.18.0
33941
33941
 
33942
33942
  @node W1040
33943
33943
  @section W1040
@@ -34063,7 +34063,6 @@ int i = 0;
34063
34063
  @subsection 関連メッセージ
34064
34064
 
34065
34065
  @itemize
34066
- @item @ref{W1044} 文を包含する式は ISO C 標準規格ではサポートされていません。言語拡張と見なします。
34067
34066
  @item @ref{W1045} この `@@ word' 構文は無視されます。
34068
34067
  @end itemize
34069
34068
 
@@ -34071,38 +34070,6 @@ int i = 0;
34071
34070
 
34072
34071
  2.0.0 以降の予定
34073
34072
 
34074
- @node W1044
34075
- @section W1044
34076
- @cindex W1044
34077
-
34078
- @subsection メッセージ本文
34079
-
34080
- 文を包含する式は ISO C 標準規格ではサポートされていません。言語拡張と見なします。
34081
-
34082
- @subsection 内容
34083
-
34084
- @b{このメッセージは AdLint 2.0.0 で出力する予定です。}
34085
-
34086
- このような構文記述は、ISO C90 標準規格ではサポートされていないため、言語拡張とみなされます。
34087
-
34088
- @subsection サンプルコード
34089
-
34090
- @c{未実装}
34091
- @verbatim
34092
- /* 追記予定 */
34093
- @end verbatim
34094
-
34095
- @subsection 関連メッセージ
34096
-
34097
- @itemize
34098
- @item @ref{W1043} `@@ address' は、ISO C 標準規格ではサポートされていません。言語拡張と見なします。
34099
- @item @ref{W1045} この `@@ word' 構文は無視されます。
34100
- @end itemize
34101
-
34102
- @subsection 対応バージョン
34103
-
34104
- 2.0.0 の予定
34105
-
34106
34073
  @node W1045
34107
34074
  @section W1045
34108
34075
  @cindex W1045
@@ -34128,7 +34095,6 @@ int i = 0;
34128
34095
 
34129
34096
  @itemize
34130
34097
  @item @ref{W1043} `@@ address' は、ISO C 標準規格ではサポートされていません。言語拡張と見なします。
34131
- @item @ref{W1044} 文を包含する式は ISO C 標準規格ではサポートされていません。言語拡張と見なします。
34132
34098
  @end itemize
34133
34099
 
34134
34100
  @subsection 対応バージョン
@@ -34174,15 +34140,16 @@ ISO C 規格ではバックスラッシュ文字の後に直接改行文字が
34174
34140
 
34175
34141
  @subsection 内容
34176
34142
 
34177
- @b{このメッセージは AdLint 2.0.0 で出力する予定です。}
34178
-
34179
34143
  初期化子が定数式になっていません。
34180
34144
 
34181
34145
  @subsection サンプルコード
34182
34146
 
34183
- @c{未実装}
34184
34147
  @verbatim
34185
- /* 追記予定 */
34148
+ int foo(int i, int j)
34149
+ {
34150
+ int a[] = { 0, i, j }; /* W1047 */
34151
+ return a[1];
34152
+ }
34186
34153
  @end verbatim
34187
34154
 
34188
34155
  @subsection 関連メッセージ
@@ -34191,7 +34158,7 @@ ISO C 規格ではバックスラッシュ文字の後に直接改行文字が
34191
34158
 
34192
34159
  @subsection 対応バージョン
34193
34160
 
34194
- 2.0.0 の予定
34161
+ 1.18.0
34195
34162
 
34196
34163
  @node W1048
34197
34164
  @section W1048
@@ -35170,20 +35137,15 @@ default:
35170
35137
 
35171
35138
  @subsection 内容
35172
35139
 
35173
- @b{このメッセージは AdLint 2.0.0 で出力する予定です。}
35174
-
35175
35140
  出口となる @code{return} 文が関数内に複数個存在しています。
35176
35141
 
35177
35142
  @subsection サンプルコード
35178
35143
 
35179
35144
  @verbatim
35180
- int func(int a)
35145
+ void foo(int i) /* W1071 */
35181
35146
  {
35182
- if (a == 0) {
35183
- return 0;
35184
- }
35185
- else {
35186
- return 1; /* W1071 */
35147
+ if (i == 0) {
35148
+ return;
35187
35149
  }
35188
35150
  }
35189
35151
  @end verbatim
@@ -35194,7 +35156,7 @@ int func(int a)
35194
35156
 
35195
35157
  @subsection 対応バージョン
35196
35158
 
35197
- 2.0.0 の予定
35159
+ 1.18.0
35198
35160
 
35199
35161
  @node W1072
35200
35162
  @section W1072