adlint 1.14.0 → 1.16.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. data/ChangeLog +265 -0
  2. data/MANIFEST +15 -0
  3. data/NEWS +30 -4
  4. data/etc/conf.d/noarch/adlint_all_bat.erb +1 -1
  5. data/etc/mesg.d/en_US/messages.yml +3 -3
  6. data/etc/mesg.d/ja_JP/messages.yml +3 -3
  7. data/features/message_detection/W0001.feature +2 -0
  8. data/features/message_detection/W0007.feature +8 -0
  9. data/features/message_detection/W0010.feature +4 -1
  10. data/features/message_detection/W0013.feature +8 -0
  11. data/features/message_detection/W0093.feature +3 -0
  12. data/features/message_detection/W0104.feature +7 -0
  13. data/features/message_detection/W0643.feature +80 -0
  14. data/features/message_detection/W0646.feature +115 -0
  15. data/features/message_detection/W0691.feature +100 -0
  16. data/features/message_detection/W0692.feature +32 -0
  17. data/features/message_detection/W0694.feature +128 -0
  18. data/features/message_detection/W0716.feature +3 -0
  19. data/features/message_detection/W0717.feature +3 -0
  20. data/features/message_detection/W0718.feature +3 -0
  21. data/features/message_detection/W0723.feature +2 -0
  22. data/features/message_detection/W0732.feature +3 -0
  23. data/features/message_detection/W0733.feature +3 -0
  24. data/features/message_detection/W0734.feature +8 -0
  25. data/features/message_detection/W0735.feature +8 -0
  26. data/features/message_detection/W0805.feature +92 -0
  27. data/features/message_detection/W0811.feature +79 -0
  28. data/features/message_detection/W1031.feature +7 -0
  29. data/features/message_detection/W1040.feature +89 -0
  30. data/features/message_detection/W1041.feature +15 -0
  31. data/features/message_detection/W1046.feature +60 -0
  32. data/features/message_detection/W1052.feature +3 -0
  33. data/features/message_detection/W1066.feature +3 -0
  34. data/features/message_detection/W1067.feature +3 -0
  35. data/features/message_detection/W1068.feature +3 -0
  36. data/features/message_detection/W1069.feature +5 -0
  37. data/features/message_detection/W1070.feature +6 -0
  38. data/features/message_detection/W1072.feature +1 -0
  39. data/features/message_detection/W1073.feature +145 -0
  40. data/features/message_detection/W1074.feature +139 -0
  41. data/features/message_detection/W1075.feature +86 -0
  42. data/features/message_detection/W1076.feature +66 -0
  43. data/features/message_detection/W1077.feature +105 -0
  44. data/features/message_detection/W9003.feature +4 -0
  45. data/lib/adlint/c/ctrlexpr.rb +3 -0
  46. data/lib/adlint/c/interp.rb +11 -5
  47. data/lib/adlint/c/lexer.rb +14 -3
  48. data/lib/adlint/c/message.rb +192 -0
  49. data/lib/adlint/c/parser.rb +19 -3
  50. data/lib/adlint/c/parser.y +18 -2
  51. data/lib/adlint/c/phase.rb +19 -6
  52. data/lib/adlint/c/syntax.rb +6 -0
  53. data/lib/adlint/c/type.rb +5 -1
  54. data/lib/adlint/cpp/constexpr.rb +3 -3
  55. data/lib/adlint/cpp/constexpr.y +3 -3
  56. data/lib/adlint/cpp/eval.rb +60 -86
  57. data/lib/adlint/cpp/lexer.rb +82 -28
  58. data/lib/adlint/cpp/macro.rb +64 -35
  59. data/lib/adlint/cpp/message.rb +137 -4
  60. data/lib/adlint/cpp/phase.rb +8 -0
  61. data/lib/adlint/cpp/syntax.rb +25 -0
  62. data/lib/adlint/lang.rb +2 -1
  63. data/lib/adlint/version.rb +2 -2
  64. data/share/doc/developers_guide_ja.html +3 -3
  65. data/share/doc/developers_guide_ja.texi +1 -1
  66. data/share/doc/users_guide_en.html +102 -85
  67. data/share/doc/users_guide_en.texi +85 -69
  68. data/share/doc/users_guide_ja.html +102 -94
  69. data/share/doc/users_guide_ja.texi +85 -77
  70. metadata +17 -2
@@ -111,18 +111,26 @@ module Cpp #:nodoc:
111
111
  W0632.new(context),
112
112
  W0633.new(context),
113
113
  W0634.new(context),
114
+ W0643.new(context),
114
115
  W0687.new(context),
115
116
  W0688.new(context),
116
117
  W0689.new(context),
117
118
  W0690.new(context),
119
+ W0691.new(context),
120
+ W0692.new(context),
118
121
  W0695.new(context),
119
122
  W0696.new(context),
120
123
  W0804.new(context),
124
+ W0805.new(context),
121
125
  W0806.new(context),
122
126
  W0807.new(context),
123
127
  W0808.new(context),
128
+ W0811.new(context),
124
129
  W0831.new(context),
125
130
  W0832.new(context),
131
+ W1040.new(context),
132
+ W1041.new(context),
133
+ W1046.new(context),
126
134
  W9002.new(context)
127
135
  ]
128
136
  end
@@ -497,6 +497,22 @@ module Cpp #:nodoc:
497
497
  end
498
498
  end
499
499
 
500
+ class UnknownDirective < GroupPart
501
+ def initialize(token)
502
+ @token = token
503
+ end
504
+
505
+ attr_reader :token
506
+
507
+ def location
508
+ @token.location
509
+ end
510
+
511
+ def inspect(indent = 0)
512
+ " " * indent + "#{short_class_name} (#{@token.inspect})"
513
+ end
514
+ end
515
+
500
516
  class AsmSection < GroupPart
501
517
  def initialize(asm_line, endasm_line)
502
518
  @asm_line = asm_line
@@ -1003,6 +1019,9 @@ module Cpp #:nodoc:
1003
1019
  def visit_null_directive(node)
1004
1020
  end
1005
1021
 
1022
+ def visit_unknown_directive(node)
1023
+ end
1024
+
1006
1025
  def visit_asm_section(node)
1007
1026
  end
1008
1027
 
@@ -1138,6 +1157,8 @@ module Cpp #:nodoc:
1138
1157
  def_plugin :leave_text_line
1139
1158
  def_plugin :enter_null_directive
1140
1159
  def_plugin :leave_null_directive
1160
+ def_plugin :enter_unknown_directive
1161
+ def_plugin :leave_unknown_directive
1141
1162
  def_plugin :enter_pp_tokens
1142
1163
  def_plugin :leave_pp_tokens
1143
1164
  def_plugin :enter_error_expression
@@ -1271,6 +1292,10 @@ module Cpp #:nodoc:
1271
1292
  visit_with_notifying(__method__, node) { super }
1272
1293
  end
1273
1294
 
1295
+ def visit_unknown_directive(node)
1296
+ visit_with_notifying(__method__, node) { super }
1297
+ end
1298
+
1274
1299
  def visit_pp_tokens(node)
1275
1300
  visit_with_notifying(__method__, node) { super }
1276
1301
  end
data/lib/adlint/lang.rb CHANGED
@@ -69,10 +69,10 @@ module AdLint #:nodoc:
69
69
  def single_module_phases
70
70
  [
71
71
  AdLint::Cpp::Prepare1Phase,
72
- AdLint::C::Prepare1Phase,
73
72
  AdLint::Cpp::Prepare2Phase,
74
73
  AdLint::Cpp::EvalPhase,
75
74
  AdLint::Cpp::SubstPhase,
75
+ AdLint::C::Prepare1Phase,
76
76
  AdLint::C::ParsePhase,
77
77
  AdLint::C::ResolvePhase,
78
78
  AdLint::C::Prepare2Phase,
@@ -89,6 +89,7 @@ module AdLint #:nodoc:
89
89
  AdLint::Cpp::Prepare1Phase,
90
90
  AdLint::Cpp::EvalPhase,
91
91
  AdLint::Cpp::SubstPhase,
92
+ AdLint::C::Prepare1Phase,
92
93
  AdLint::C::ParsePhase
93
94
  ].freeze
94
95
  end
@@ -32,9 +32,9 @@
32
32
  module AdLint #:nodoc:
33
33
 
34
34
  MAJOR_VERSION = 1
35
- MINOR_VERSION = 14
35
+ MINOR_VERSION = 16
36
36
  PATCH_VERSION = 0
37
- RELEASE_DATE = "2012-07-04"
37
+ RELEASE_DATE = "2012-07-18"
38
38
 
39
39
  TRAITS_SCHEMA_VERSION = "1.0.0"
40
40
 
@@ -1,8 +1,8 @@
1
1
  <html lang="ja">
2
2
  <head>
3
- <title>AdLint 1.14.0 開発者ガイド</title>
3
+ <title>AdLint 1.16.0 開発者ガイド</title>
4
4
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5
- <meta name="description" content="AdLint 1.14.0 開発者ガイド">
5
+ <meta name="description" content="AdLint 1.16.0 開発者ガイド">
6
6
  <meta name="generator" content="makeinfo 4.13">
7
7
  <link title="Top" rel="top" href="#Top">
8
8
  <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
@@ -44,7 +44,7 @@ td { border: 1px solid black; }
44
44
  --></style>
45
45
  </head>
46
46
  <body>
47
- <h1 class="settitle">AdLint 1.14.0 開発者ガイド</h1>
47
+ <h1 class="settitle">AdLint 1.16.0 開発者ガイド</h1>
48
48
  <div class="contents">
49
49
  <h2>Table of Contents</h2>
50
50
  <ul>
@@ -2,7 +2,7 @@
2
2
  @setfilename developers_guide_ja.info
3
3
  @documentlanguage ja
4
4
  @documentencoding utf-8
5
- @settitle AdLint 1.14.0 開発者ガイド
5
+ @settitle AdLint 1.16.0 開発者ガイド
6
6
 
7
7
  @copying
8
8
  Copyright (C) 2010-2012, OGIS-RI Co.,Ltd.
@@ -1,8 +1,8 @@
1
1
  <html lang="en">
2
2
  <head>
3
- <title>AdLint 1.14.0 User's Guide</title>
3
+ <title>AdLint 1.16.0 User's Guide</title>
4
4
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5
- <meta name="description" content="AdLint 1.14.0 User's Guide">
5
+ <meta name="description" content="AdLint 1.16.0 User's Guide">
6
6
  <meta name="generator" content="makeinfo 4.13">
7
7
  <link title="Top" rel="top" href="#Top">
8
8
  <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
@@ -44,7 +44,7 @@ td { border: 1px solid black; }
44
44
  --></style>
45
45
  </head>
46
46
  <body>
47
- <h1 class="settitle">AdLint 1.14.0 User's Guide</h1>
47
+ <h1 class="settitle">AdLint 1.16.0 User's Guide</h1>
48
48
  <div class="node">
49
49
  <a name="Top"></a>
50
50
  <p><hr>
@@ -2654,7 +2654,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
2654
2654
  <li><a href="#W0689">W0689</a>: #line directive syntax doesn't match `#line integer constant \"string\"'.
2655
2655
  <li><a href="#W0690">W0690</a>: No line number after #line directive.
2656
2656
  <li><a href="#W0691">W0691</a>: The result of `##' operator is not valid preprocessing token.
2657
- <li><a href="#W0692">W0692</a>: A function-like macro doesn't given an actual argument.
2657
+ <li><a href="#W0692">W0692</a>: A function-like macro `%s' doesn't given an actual argument.
2658
2658
  <li><a href="#W0693">W0693</a>: A function-like macro is called by actual argument which its definition is smaller.
2659
2659
  <li><a href="#W0694">W0694</a>: 'assert' macro is inhibited to call the function named `assert'. This result is undefined.
2660
2660
  <li><a href="#W0695">W0695</a>: If #undef the 'assert' macro, and enable to call its name function, the result is undefined.
@@ -2790,7 +2790,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#Top">Top</a>
2790
2790
  <li><a href="#W1037">W1037</a>: `%s' which has external coupling is declared more than one, this is incompatible.
2791
2791
  <li><a href="#W1039">W1039</a>: `ll' is used in conversion specifier.
2792
2792
  <li><a href="#W1040">W1040</a>: An unrecognizable string is described after preprocessing directive.
2793
- <li><a href="#W1041">W1041</a>: `#%s' is not official preprocessing directive of ISO C standards.
2793
+ <li><a href="#W1041">W1041</a>: `%s' is not official preprocessing directive of ISO C standards.
2794
2794
  <li><a href="#W1042">W1042</a>: 'sizeof' operator is using in preprocessing directive. This is the language extension.
2795
2795
  <li><a href="#W1043">W1043</a>: `@ address' is not supported ISO C standards. It will be considered as language extension.
2796
2796
  <li><a href="#W1044">W1044</a>: An expression which includes the statement is not supported ISO C standards. It will be considered as language extension.
@@ -30445,13 +30445,12 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#Messages">Messages</a>
30445
30445
 
30446
30446
  <h4 class="subsection">6.525.2 Content</h4>
30447
30447
 
30448
- <p><b>This message will be supported in AdLint 2.0.0</b>
30449
-
30450
- <p>Under construction.
30448
+ <p>Under construction.
30451
30449
 
30452
30450
  <h4 class="subsection">6.525.3 Sample code</h4>
30453
30451
 
30454
- <pre class="verbatim">/* will be added */
30452
+ <pre class="verbatim">#define MACRO(x) #x
30453
+ const char *str = MACRO(foo\); /* W0643 */
30455
30454
  </pre>
30456
30455
 
30457
30456
  <h4 class="subsection">6.525.4 Related message</h4>
@@ -30465,7 +30464,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#Messages">Messages</a>
30465
30464
 
30466
30465
  <h4 class="subsection">6.525.5 Since</h4>
30467
30466
 
30468
- <p>2.0.0 (planned)
30467
+ <p>1.16.0
30469
30468
 
30470
30469
  <div class="node">
30471
30470
  <a name="W0644"></a>
@@ -30573,13 +30572,11 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#Messages">Messages</a>
30573
30572
 
30574
30573
  <h4 class="subsection">6.528.2 Content</h4>
30575
30574
 
30576
- <p><b>This message will be supported in AdLint 2.0.0</b>
30577
-
30578
- <p>Under construction.
30575
+ <p>Under construction.
30579
30576
 
30580
30577
  <h4 class="subsection">6.528.3 Sample code</h4>
30581
30578
 
30582
- <pre class="verbatim">/* will be added */
30579
+ <pre class="verbatim">static const char *str = "foo" L"bar"; /* W0646 */
30583
30580
  </pre>
30584
30581
 
30585
30582
  <h4 class="subsection">6.528.4 Related message</h4>
@@ -30593,7 +30590,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#Messages">Messages</a>
30593
30590
 
30594
30591
  <h4 class="subsection">6.528.5 Since</h4>
30595
30592
 
30596
- <p>2.0.0 (planned)
30593
+ <p>1.16.0
30597
30594
 
30598
30595
  <div class="node">
30599
30596
  <a name="W0649"></a>
@@ -33174,13 +33171,13 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#Messages">Messages</a>
33174
33171
 
33175
33172
  <h4 class="subsection">6.569.2 Content</h4>
33176
33173
 
33177
- <p><b>This message will be supported in AdLint 2.0.0</b>
33178
-
33179
- <p>Under construction.
33174
+ <p>Under construction.
33180
33175
 
33181
33176
  <h4 class="subsection">6.569.3 Sample code</h4>
33182
33177
 
33183
- <pre class="verbatim">/* will be added */
33178
+ <pre class="verbatim">#define MACRO(a, b) a ## b
33179
+
33180
+ double d = (double) MACRO(-, 123); /* W0691 */
33184
33181
  </pre>
33185
33182
 
33186
33183
  <h4 class="subsection">6.569.4 Related message</h4>
@@ -33194,7 +33191,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#Messages">Messages</a>
33194
33191
 
33195
33192
  <h4 class="subsection">6.569.5 Since</h4>
33196
33193
 
33197
- <p>2.0.0 (planned)
33194
+ <p>1.16.0
33198
33195
 
33199
33196
  <div class="node">
33200
33197
  <a name="W0692"></a>
@@ -33211,17 +33208,17 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#Messages">Messages</a>
33211
33208
 
33212
33209
  <h4 class="subsection">6.570.1 Message body</h4>
33213
33210
 
33214
- <p>A function-like macro doesn't given an actual argument.
33211
+ <p>A function-like macro `%s' doesn't given an actual argument.
33215
33212
 
33216
33213
  <h4 class="subsection">6.570.2 Content</h4>
33217
33214
 
33218
- <p><b>This message will be supported in AdLint 2.0.0</b>
33219
-
33220
- <p>Under construction.
33215
+ <p>Under construction.
33221
33216
 
33222
33217
  <h4 class="subsection">6.570.3 Sample code</h4>
33223
33218
 
33224
- <pre class="verbatim">/* will be added */
33219
+ <pre class="verbatim">#define MACRO(a) #a
33220
+
33221
+ const char *s = (char *) MACRO(); /* W0692 */
33225
33222
  </pre>
33226
33223
 
33227
33224
  <h4 class="subsection">6.570.4 Related message</h4>
@@ -33232,7 +33229,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#Messages">Messages</a>
33232
33229
 
33233
33230
  <h4 class="subsection">6.570.5 Since</h4>
33234
33231
 
33235
- <p>2.0.0 (planned)
33232
+ <p>1.16.0
33236
33233
 
33237
33234
  <div class="node">
33238
33235
  <a name="W0693"></a>
@@ -33265,7 +33262,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#Messages">Messages</a>
33265
33262
  <h4 class="subsection">6.571.4 Related message</h4>
33266
33263
 
33267
33264
  <ul>
33268
- <li><a href="#W0692">W0692</a> A function-like macro doesn't given an actual argument.
33265
+ <li><a href="#W0692">W0692</a> A function-like macro `%s' doesn't given an actual argument.
33269
33266
  </ul>
33270
33267
 
33271
33268
  <h4 class="subsection">6.571.5 Since</h4>
@@ -33291,13 +33288,17 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#Messages">Messages</a>
33291
33288
 
33292
33289
  <h4 class="subsection">6.572.2 Content</h4>
33293
33290
 
33294
- <p><b>This message will be supported in AdLint 2.0.0</b>
33295
-
33296
- <p>Under construction.
33291
+ <p>Under construction.
33297
33292
 
33298
33293
  <h4 class="subsection">6.572.3 Sample code</h4>
33299
33294
 
33300
- <pre class="verbatim">/* will be added */
33295
+ <pre class="verbatim">#undef assert
33296
+ extern void assert(int);
33297
+
33298
+ void foo(void)
33299
+ {
33300
+ assert("should not be reached" == ""); /* W0694 */
33301
+ }
33301
33302
  </pre>
33302
33303
 
33303
33304
  <h4 class="subsection">6.572.4 Related message</h4>
@@ -33306,7 +33307,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#Messages">Messages</a>
33306
33307
 
33307
33308
  <h4 class="subsection">6.572.5 Since</h4>
33308
33309
 
33309
- <p>2.0.0 (planned)
33310
+ <p>1.16.0
33310
33311
 
33311
33312
  <div class="node">
33312
33313
  <a name="W0695"></a>
@@ -37886,13 +37887,13 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#Messages">Messages</a>
37886
37887
 
37887
37888
  <h4 class="subsection">6.673.2 Content</h4>
37888
37889
 
37889
- <p><b>This message will be supported in AdLint 2.0.0</b>
37890
-
37891
- <p>Under construction.
37890
+ <p>Under construction.
37892
37891
 
37893
37892
  <h4 class="subsection">6.673.3 Sample code</h4>
37894
37893
 
37895
- <pre class="verbatim">#if defined() /* W0805 */
37894
+ <pre class="verbatim">#if defined "foo" /* W0805 */
37895
+ int i = 0;
37896
+ #endif
37896
37897
  </pre>
37897
37898
 
37898
37899
  <h4 class="subsection">6.673.4 Related message</h4>
@@ -37903,7 +37904,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#Messages">Messages</a>
37903
37904
 
37904
37905
  <h4 class="subsection">6.673.5 Since</h4>
37905
37906
 
37906
- <p>2.0.0 (planned)
37907
+ <p>1.16.0
37907
37908
 
37908
37909
  <div class="node">
37909
37910
  <a name="W0806"></a>
@@ -38123,13 +38124,15 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#Messages">Messages</a>
38123
38124
 
38124
38125
  <h4 class="subsection">6.679.2 Content</h4>
38125
38126
 
38126
- <p><b>This message will be supported in AdLint 2.0.0</b>
38127
-
38128
- <p>Under construction.
38127
+ <p>Under construction.
38129
38128
 
38130
38129
  <h4 class="subsection">6.679.3 Sample code</h4>
38131
38130
 
38132
- <pre class="verbatim">/* will be added */
38131
+ <pre class="verbatim">#define COND defined(FOO)
38132
+
38133
+ #if COND /* W0811 */
38134
+ int i = 0;
38135
+ #endif
38133
38136
  </pre>
38134
38137
 
38135
38138
  <h4 class="subsection">6.679.4 Related message</h4>
@@ -38138,7 +38141,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#Messages">Messages</a>
38138
38141
 
38139
38142
  <h4 class="subsection">6.679.5 Since</h4>
38140
38143
 
38141
- <p>2.0.0 (planned)
38144
+ <p>1.16.0
38142
38145
 
38143
38146
  <div class="node">
38144
38147
  <a name="W0827"></a>
@@ -39147,25 +39150,33 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#Messages">Messages</a>
39147
39150
 
39148
39151
  <h4 class="subsection">6.705.2 Content</h4>
39149
39152
 
39150
- <p><b>This message will be supported in AdLint 2.0.0</b>
39151
-
39152
- <p>Under construction.
39153
+ <p>Under construction.
39153
39154
 
39154
39155
  <h4 class="subsection">6.705.3 Sample code</h4>
39155
39156
 
39156
- <pre class="verbatim">/* will be added */
39157
+ <pre class="verbatim">#define TEST
39158
+
39159
+ #ifdef TEST
39160
+ #if defined(CASE_1)
39161
+ int i = 1;
39162
+ #elif defined(CASE_2)
39163
+ int i = 2;
39164
+ #endif CASE /* W1040 */
39165
+ #else
39166
+ int i = 0;
39167
+ #endif TEST /* W1040 */
39157
39168
  </pre>
39158
39169
 
39159
39170
  <h4 class="subsection">6.705.4 Related message</h4>
39160
39171
 
39161
39172
  <ul>
39162
- <li><a href="#W1041">W1041</a> `#%s' is not official preprocessing directive of ISO C standards.
39173
+ <li><a href="#W1041">W1041</a> `%s' is not official preprocessing directive of ISO C standards.
39163
39174
  <li><a href="#W1042">W1042</a> 'sizeof' operator is using in preprocessing directive. This is the language extension.
39164
39175
  </ul>
39165
39176
 
39166
39177
  <h4 class="subsection">6.705.5 Since</h4>
39167
39178
 
39168
- <p>2.0.0 (planned)
39179
+ <p>1.16.0
39169
39180
 
39170
39181
  <div class="node">
39171
39182
  <a name="W1041"></a>
@@ -39182,17 +39193,15 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#Messages">Messages</a>
39182
39193
 
39183
39194
  <h4 class="subsection">6.706.1 Message body</h4>
39184
39195
 
39185
- <p>`#%s' is not official preprocessing directive of ISO C standards.
39196
+ <p>`%s' is not official preprocessing directive of ISO C standards.
39186
39197
 
39187
39198
  <h4 class="subsection">6.706.2 Content</h4>
39188
39199
 
39189
- <p><b>This message will be supported in AdLint 2.0.0</b>
39190
-
39191
- <p>Under construction.
39200
+ <p>Under construction.
39192
39201
 
39193
39202
  <h4 class="subsection">6.706.3 Sample code</h4>
39194
39203
 
39195
- <pre class="verbatim">/* will be added */
39204
+ <pre class="verbatim">#compiler_specific_extension 1 2.3 "4" /* W1041 */
39196
39205
  </pre>
39197
39206
 
39198
39207
  <h4 class="subsection">6.706.4 Related message</h4>
@@ -39204,7 +39213,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#Messages">Messages</a>
39204
39213
 
39205
39214
  <h4 class="subsection">6.706.5 Since</h4>
39206
39215
 
39207
- <p>2.0.0 (planned)
39216
+ <p>1.16.0
39208
39217
 
39209
39218
  <div class="node">
39210
39219
  <a name="W1042"></a>
@@ -39238,7 +39247,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#Messages">Messages</a>
39238
39247
 
39239
39248
  <ul>
39240
39249
  <li><a href="#W1040">W1040</a> An unrecognizable string is described after preprocessing directive.
39241
- <li><a href="#W1041">W1041</a> `#%s' is not official preprocessing directive of ISO C standards.
39250
+ <li><a href="#W1041">W1041</a> `%s' is not official preprocessing directive of ISO C standards.
39242
39251
  </ul>
39243
39252
 
39244
39253
  <h4 class="subsection">6.707.5 Since</h4>
@@ -39381,13 +39390,14 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#Messages">Messages</a>
39381
39390
 
39382
39391
  <h4 class="subsection">6.711.2 Content</h4>
39383
39392
 
39384
- <p><b>This message will be supported in AdLint 2.0.0</b>
39385
-
39386
- <p>Under construction.
39393
+ <p>Under construction.
39387
39394
 
39388
39395
  <h4 class="subsection">6.711.3 Sample code</h4>
39389
39396
 
39390
- <pre class="verbatim">/* will be added */
39397
+ <pre class="verbatim">#define FOO(a, b) /* OK */ \
39398
+ ( /* W1046 */ \
39399
+ (a) + (b) /* W1046 */ \
39400
+ )
39391
39401
  </pre>
39392
39402
 
39393
39403
  <h4 class="subsection">6.711.4 Related message</h4>
@@ -39396,7 +39406,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#Messages">Messages</a>
39396
39406
 
39397
39407
  <h4 class="subsection">6.711.5 Since</h4>
39398
39408
 
39399
- <p>2.0.0 (planned)
39409
+ <p>1.16.0
39400
39410
 
39401
39411
  <div class="node">
39402
39412
  <a name="W1047"></a>
@@ -40683,13 +40693,19 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#Messages">Messages</a>
40683
40693
 
40684
40694
  <h4 class="subsection">6.738.2 Content</h4>
40685
40695
 
40686
- <p><b>This message will be supported in AdLint 2.0.0</b>
40687
-
40688
- <p>Under construction.
40696
+ <p>Under construction.
40689
40697
 
40690
40698
  <h4 class="subsection">6.738.3 Sample code</h4>
40691
40699
 
40692
- <pre class="verbatim">/* will be added */
40700
+ <pre class="verbatim">extern int bar(void);
40701
+ static void foo(void)
40702
+ {
40703
+ int i;
40704
+ int j;
40705
+ for (i = 0, bar(); i &lt; 10; i++) { /* W1073 */
40706
+ j = bar(); /* OK */
40707
+ }
40708
+ }
40693
40709
  </pre>
40694
40710
 
40695
40711
  <h4 class="subsection">6.738.4 Related message</h4>
@@ -40698,7 +40714,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#Messages">Messages</a>
40698
40714
 
40699
40715
  <h4 class="subsection">6.738.5 Since</h4>
40700
40716
 
40701
- <p>2.0.0 (planned)
40717
+ <p>1.16.0
40702
40718
 
40703
40719
  <div class="node">
40704
40720
  <a name="W1074"></a>
@@ -40719,13 +40735,21 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#Messages">Messages</a>
40719
40735
 
40720
40736
  <h4 class="subsection">6.739.2 Content</h4>
40721
40737
 
40722
- <p><b>This message will be supported in AdLint 2.0.0</b>
40723
-
40724
- <p>Under construction.
40738
+ <p>Under construction.
40725
40739
 
40726
40740
  <h4 class="subsection">6.739.3 Sample code</h4>
40727
40741
 
40728
- <pre class="verbatim">int i = sizeof(data++); /* W1074 */
40742
+ <pre class="verbatim">static int foo(void)
40743
+ {
40744
+ int i = 0;
40745
+
40746
+ if (sizeof(i++) == 4) { /* W1074 */
40747
+ return 0;
40748
+ }
40749
+ else {
40750
+ return 1;
40751
+ }
40752
+ }
40729
40753
  </pre>
40730
40754
 
40731
40755
  <h4 class="subsection">6.739.4 Related message</h4>
@@ -40734,7 +40758,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#Messages">Messages</a>
40734
40758
 
40735
40759
  <h4 class="subsection">6.739.5 Since</h4>
40736
40760
 
40737
- <p>2.0.0 (planned)
40761
+ <p>1.16.0
40738
40762
 
40739
40763
  <div class="node">
40740
40764
  <a name="W1075"></a>
@@ -40755,9 +40779,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#Messages">Messages</a>
40755
40779
 
40756
40780
  <h4 class="subsection">6.740.2 Content</h4>
40757
40781
 
40758
- <p><b>This message will be supported in AdLint 2.0.0</b>
40759
-
40760
- <p>Under construction.
40782
+ <p>Under construction.
40761
40783
 
40762
40784
  <h4 class="subsection">6.740.3 Sample code</h4>
40763
40785
 
@@ -40774,7 +40796,7 @@ int func(void) /* W1075 */
40774
40796
 
40775
40797
  <h4 class="subsection">6.740.5 Since</h4>
40776
40798
 
40777
- <p>2.0.0 (planned)
40799
+ <p>1.16.0
40778
40800
 
40779
40801
  <div class="node">
40780
40802
  <a name="W1076"></a>
@@ -40795,16 +40817,13 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#Messages">Messages</a>
40795
40817
 
40796
40818
  <h4 class="subsection">6.741.2 Content</h4>
40797
40819
 
40798
- <p><b>This message will be supported in AdLint 2.0.0</b>
40799
-
40800
- <p>Under construction.
40820
+ <p>Under construction.
40801
40821
 
40802
40822
  <h4 class="subsection">6.741.3 Sample code</h4>
40803
40823
 
40804
40824
  <pre class="verbatim">static int func(void) /* W1076 */
40805
40825
  {
40806
- ...
40807
- return ret;
40826
+ return 0;
40808
40827
  }
40809
40828
  </pre>
40810
40829
 
@@ -40814,7 +40833,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#Messages">Messages</a>
40814
40833
 
40815
40834
  <h4 class="subsection">6.741.5 Since</h4>
40816
40835
 
40817
- <p>2.0.0 (planned)
40836
+ <p>1.16.0
40818
40837
 
40819
40838
  <div class="node">
40820
40839
  <a name="W1077"></a>
@@ -40835,13 +40854,11 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#Messages">Messages</a>
40835
40854
 
40836
40855
  <h4 class="subsection">6.742.2 Content</h4>
40837
40856
 
40838
- <p><b>This message will be supported in AdLint 2.0.0</b>
40839
-
40840
- <p>Under construction.
40857
+ <p>Under construction.
40841
40858
 
40842
40859
  <h4 class="subsection">6.742.3 Sample code</h4>
40843
40860
 
40844
- <pre class="verbatim">extern int array[]; /* W1077 */
40861
+ <pre class="verbatim">extern int a[]; /* W1077 */
40845
40862
  </pre>
40846
40863
 
40847
40864
  <h4 class="subsection">6.742.4 Related message</h4>
@@ -40850,7 +40867,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#Messages">Messages</a>
40850
40867
 
40851
40868
  <h4 class="subsection">6.742.5 Since</h4>
40852
40869
 
40853
- <p>2.0.0 (planned)
40870
+ <p>1.16.0
40854
40871
 
40855
40872
  <div class="node">
40856
40873
  <a name="W9001"></a>