adlint 1.6.0 → 1.8.0
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +389 -37
- data/INSTALL +3 -0
- data/MANIFEST +7 -0
- data/NEWS +50 -10
- data/etc/conf.d/i686-mingw/cinit-gcc_4.6.1.erb +1 -1
- data/etc/mesg.d/en_US/messages.yml +7 -7
- data/etc/mesg.d/ja_JP/messages.yml +4 -4
- data/lib/adlint/c/branch.rb +4 -4
- data/lib/adlint/c/code.rb +11 -13
- data/lib/adlint/c/enum.rb +0 -2
- data/lib/adlint/c/environ.rb +13 -7
- data/lib/adlint/c/expr.rb +5 -1
- data/lib/adlint/c/interp.rb +10 -6
- data/lib/adlint/c/mediator.rb +1 -0
- data/lib/adlint/c/message.rb +294 -111
- data/lib/adlint/c/message_shima.rb +63 -0
- data/lib/adlint/c/metric.rb +25 -13
- data/lib/adlint/c/object.rb +168 -31
- data/lib/adlint/c/parser.rb +3 -3
- data/lib/adlint/c/phase.rb +20 -3
- data/lib/adlint/c/syntax.rb +175 -17
- data/lib/adlint/c/value.rb +199 -126
- data/lib/adlint/cpp/asm.rb +4 -4
- data/lib/adlint/cpp/constexpr.rb +1 -1
- data/lib/adlint/cpp/eval.rb +6 -4
- data/lib/adlint/cpp/message.rb +100 -7
- data/lib/adlint/cpp/phase.rb +12 -1
- data/lib/adlint/cpp/source.rb +2 -2
- data/lib/adlint/cpp/subst.rb +2 -4
- data/lib/adlint/lang.rb +5 -3
- data/lib/adlint/ld/metric.rb +1 -1
- data/lib/adlint/version.rb +2 -2
- data/share/demo/Makefile +5 -0
- data/share/demo/bad_include/bad_include.c +13 -0
- data/share/demo/bad_include/test'1'.h +0 -0
- data/share/demo/bad_include/test'2'.h +0 -0
- data/share/demo/incomplete_ifelse/incomplete_ifelse.c +29 -0
- data/share/demo/inline_asm/inline_asm.c +25 -0
- data/share/demo/invalid_call/invalid_call.c +12 -4
- data/share/demo/logical_expr/logical_expr.c +73 -0
- data/share/demo/register_vars/register_vars.c +12 -0
- data/share/demo/typedef_each_src/typedef_each_src.c +9 -0
- data/share/demo/wrap_around/wrap_around.c +17 -0
- data/share/doc/developers_guide_ja.html +3 -3
- data/share/doc/developers_guide_ja.texi +1 -1
- data/share/doc/users_guide_en.html +137 -102
- data/share/doc/users_guide_en.texi +121 -86
- data/share/doc/users_guide_ja.html +118 -91
- data/share/doc/users_guide_ja.texi +103 -76
- metadata +10 -3
@@ -1,8 +1,8 @@
|
|
1
1
|
<html lang="en">
|
2
2
|
<head>
|
3
|
-
<title>AdLint 1.
|
3
|
+
<title>AdLint 1.8.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.
|
5
|
+
<meta name="description" content="AdLint 1.8.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.
|
47
|
+
<h1 class="settitle">AdLint 1.8.0 User's Guide</h1>
|
48
48
|
<div class="node">
|
49
49
|
<a name="Top"></a>
|
50
50
|
<p><hr>
|
@@ -2533,7 +2533,7 @@ Up: <a rel="up" accesskey="u" href="#Top">Top</a>
|
|
2533
2533
|
<li><a href="#W0535">W0535</a>: A comma operator is used in a 'for' statement.
|
2534
2534
|
<li><a href="#W0538">W0538</a>: This 'default' label is not final label in this 'switch' statement.
|
2535
2535
|
<li><a href="#W0540">W0540</a>: A function which the blank formal argument list is declared. `void' is omitted.
|
2536
|
-
<li><a href="#W0541">W0541</a>:
|
2536
|
+
<li><a href="#W0541">W0541</a>: Inline assembly code should be encapsulated by macro.
|
2537
2537
|
<li><a href="#W0542">W0542</a>: There are identifiers in the part of formal argument in a function declaration.
|
2538
2538
|
<li><a href="#W0543">W0543</a>: The identifier of formal argument in this function declaration is different from the past declaration of it.
|
2539
2539
|
<li><a href="#W0544">W0544</a>: The identifier of formal argument in the function declaration is different from the declaration of function pointer.
|
@@ -2598,8 +2598,8 @@ Up: <a rel="up" accesskey="u" href="#Top">Top</a>
|
|
2598
2598
|
<li><a href="#W0627">W0627</a>: There is a dead letter (only `;') in the following other code.
|
2599
2599
|
<li><a href="#W0628">W0628</a>: A function `%s' is defined, but this is not used in this project.
|
2600
2600
|
<li><a href="#W0629">W0629</a>: A static function `%s()' is not used in this translation unit.
|
2601
|
-
<li><a href="#W0632">W0632</a>:
|
2602
|
-
<li><a href="#W0633">W0633</a>:
|
2601
|
+
<li><a href="#W0632">W0632</a>: Using ' or " characters in `#include <%s>' directive makes undefined behavior.
|
2602
|
+
<li><a href="#W0633">W0633</a>: Using ' character in `#include "%s"' directive makes undefined behavior.
|
2603
2603
|
<li><a href="#W0634">W0634</a>: `\' is used in `#include' line. `/' is recommended for the path delimiter.
|
2604
2604
|
<li><a href="#W0635">W0635</a>: The type doesn't match with %sth conversion specifier and the corresponding actual argument.
|
2605
2605
|
<li><a href="#W0636">W0636</a>: An actual argument doesn't exist correspond to %sth conversion specifier.
|
@@ -2650,9 +2650,9 @@ Up: <a rel="up" accesskey="u" href="#Top">Top</a>
|
|
2650
2650
|
<li><a href="#W0685">W0685</a>: A character preceding the `-' in scanset o `[]' is bigger than a character following the `-'.
|
2651
2651
|
<li><a href="#W0686">W0686</a>: The same characters are described in scanset (characters enclosed by `[]').
|
2652
2652
|
<li><a href="#W0687">W0687</a>: #undef is using to delete #defined operator.
|
2653
|
-
<li><a href="#W0688">W0688</a>: There is no line number in 1 to 32767 ranges after
|
2654
|
-
<li><a href="#W0689">W0689</a>: #line
|
2655
|
-
<li><a href="#W0690">W0690</a>:
|
2653
|
+
<li><a href="#W0688">W0688</a>: There is no line number in 1 to 32767 ranges after #line directive.
|
2654
|
+
<li><a href="#W0689">W0689</a>: #line directive syntax doesn't match `#line integer constant \"string\"'.
|
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
2657
|
<li><a href="#W0692">W0692</a>: A function-like macro 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.
|
@@ -27187,7 +27187,7 @@ Up: <a rel="up" accesskey="u" href="#Messages">Messages</a>
|
|
27187
27187
|
|
27188
27188
|
<h4 class="subsection">6.449.1 Message body</h4>
|
27189
27189
|
|
27190
|
-
<p>
|
27190
|
+
<p>Inline assembly code should be encapsulated by macro.
|
27191
27191
|
|
27192
27192
|
<h4 class="subsection">6.449.2 Content</h4>
|
27193
27193
|
|
@@ -27195,7 +27195,9 @@ Up: <a rel="up" accesskey="u" href="#Messages">Messages</a>
|
|
27195
27195
|
|
27196
27196
|
<h4 class="subsection">6.449.3 Sample code</h4>
|
27197
27197
|
|
27198
|
-
<pre class="verbatim"
|
27198
|
+
<pre class="verbatim">#define ASM_CODE asm("movl %ecx, %eax")
|
27199
|
+
|
27200
|
+
void foo(int arg1, int *arg2, int arg3)
|
27199
27201
|
{
|
27200
27202
|
asm("movl %ecx, %eax"); /* W0541 */
|
27201
27203
|
__asm__("movl %ecx, (%eax)"); /* W0541 */
|
@@ -27204,6 +27206,8 @@ Up: <a rel="up" accesskey="u" href="#Messages">Messages</a>
|
|
27204
27206
|
xorl eax, eax
|
27205
27207
|
}
|
27206
27208
|
|
27209
|
+
ASM_CODE; /* OK */
|
27210
|
+
|
27207
27211
|
__asm__ volatile ( /* W0541 */
|
27208
27212
|
"int $0x80"
|
27209
27213
|
: "=a" (r)
|
@@ -29288,16 +29292,15 @@ Up: <a rel="up" accesskey="u" href="#Messages">Messages</a>
|
|
29288
29292
|
|
29289
29293
|
<h4 class="subsection">6.498.2 Content</h4>
|
29290
29294
|
|
29291
|
-
<p
|
29292
|
-
|
29293
|
-
<p>Under construction.
|
29295
|
+
<p>Under construction.
|
29294
29296
|
|
29295
29297
|
<h4 class="subsection">6.498.3 Sample code</h4>
|
29296
29298
|
|
29297
|
-
<pre class="verbatim">int a
|
29298
|
-
|
29299
|
-
if (a < 0) {
|
29300
|
-
|
29299
|
+
<pre class="verbatim">void func(int a)
|
29300
|
+
{
|
29301
|
+
if (a < 0) {
|
29302
|
+
unsigned int b = (unsigned int) a; /* W0607 */
|
29303
|
+
}
|
29301
29304
|
}
|
29302
29305
|
</pre>
|
29303
29306
|
|
@@ -29309,7 +29312,7 @@ if (a < 0) {
|
|
29309
29312
|
|
29310
29313
|
<h4 class="subsection">6.498.5 Since</h4>
|
29311
29314
|
|
29312
|
-
<p>
|
29315
|
+
<p>1.8.0
|
29313
29316
|
|
29314
29317
|
<div class="node">
|
29315
29318
|
<a name="W0608"></a>
|
@@ -29330,13 +29333,18 @@ Up: <a rel="up" accesskey="u" href="#Messages">Messages</a>
|
|
29330
29333
|
|
29331
29334
|
<h4 class="subsection">6.499.2 Content</h4>
|
29332
29335
|
|
29333
|
-
<p
|
29334
|
-
|
29335
|
-
<p>Under construction.
|
29336
|
+
<p>Under construction.
|
29336
29337
|
|
29337
29338
|
<h4 class="subsection">6.499.3 Sample code</h4>
|
29338
29339
|
|
29339
|
-
<pre class="verbatim"
|
29340
|
+
<pre class="verbatim">void fuu(int a)
|
29341
|
+
{
|
29342
|
+
unsigned char b;
|
29343
|
+
|
29344
|
+
if (a < 256) {
|
29345
|
+
b = (unsigned char) a; /* W0608 */
|
29346
|
+
}
|
29347
|
+
}
|
29340
29348
|
</pre>
|
29341
29349
|
|
29342
29350
|
<h4 class="subsection">6.499.4 Related message</h4>
|
@@ -29347,7 +29355,7 @@ Up: <a rel="up" accesskey="u" href="#Messages">Messages</a>
|
|
29347
29355
|
|
29348
29356
|
<h4 class="subsection">6.499.5 Since</h4>
|
29349
29357
|
|
29350
|
-
<p>
|
29358
|
+
<p>1.8.0
|
29351
29359
|
|
29352
29360
|
<div class="node">
|
29353
29361
|
<a name="W0609"></a>
|
@@ -29762,13 +29770,18 @@ Up: <a rel="up" accesskey="u" href="#Messages">Messages</a>
|
|
29762
29770
|
|
29763
29771
|
<h4 class="subsection">6.509.2 Content</h4>
|
29764
29772
|
|
29765
|
-
<p
|
29766
|
-
|
29767
|
-
<p>Under construction.
|
29773
|
+
<p>Under construction.
|
29768
29774
|
|
29769
29775
|
<h4 class="subsection">6.509.3 Sample code</h4>
|
29770
29776
|
|
29771
|
-
<pre class="verbatim"
|
29777
|
+
<pre class="verbatim">typedef int *INT_PTR; /* W0625 */
|
29778
|
+
|
29779
|
+
extern INT_PTR func(void);
|
29780
|
+
|
29781
|
+
INT_PTR func(void)
|
29782
|
+
{
|
29783
|
+
return 0;
|
29784
|
+
}
|
29772
29785
|
</pre>
|
29773
29786
|
|
29774
29787
|
<h4 class="subsection">6.509.4 Related message</h4>
|
@@ -29777,7 +29790,7 @@ Up: <a rel="up" accesskey="u" href="#Messages">Messages</a>
|
|
29777
29790
|
|
29778
29791
|
<h4 class="subsection">6.509.5 Since</h4>
|
29779
29792
|
|
29780
|
-
<p>
|
29793
|
+
<p>1.8.0
|
29781
29794
|
|
29782
29795
|
<div class="node">
|
29783
29796
|
<a name="W0626"></a>
|
@@ -29963,29 +29976,27 @@ Up: <a rel="up" accesskey="u" href="#Messages">Messages</a>
|
|
29963
29976
|
|
29964
29977
|
<h4 class="subsection">6.514.1 Message body</h4>
|
29965
29978
|
|
29966
|
-
<p>
|
29979
|
+
<p>Using ' or " characters in `<code>#include <%s></code>' directive makes undefined behavior.
|
29967
29980
|
|
29968
29981
|
<h4 class="subsection">6.514.2 Content</h4>
|
29969
29982
|
|
29970
|
-
<p
|
29971
|
-
|
29972
|
-
<p>Under construction.
|
29983
|
+
<p>Under construction.
|
29973
29984
|
|
29974
29985
|
<h4 class="subsection">6.514.3 Sample code</h4>
|
29975
29986
|
|
29976
|
-
<pre class="verbatim"
|
29987
|
+
<pre class="verbatim">#include <NG'_header.h> /* W0632 */
|
29977
29988
|
</pre>
|
29978
29989
|
|
29979
29990
|
<h4 class="subsection">6.514.4 Related message</h4>
|
29980
29991
|
|
29981
29992
|
<ul>
|
29982
|
-
<li><a href="#W0633">W0633</a>
|
29993
|
+
<li><a href="#W0633">W0633</a> Using ' character in `#include "%s"' directive makes undefined behavior.
|
29983
29994
|
<li><a href="#W0634">W0634</a> `\' is used in `#include' line. `/' is recommended for the path delimiter.
|
29984
29995
|
</ul>
|
29985
29996
|
|
29986
29997
|
<h4 class="subsection">6.514.5 Since</h4>
|
29987
29998
|
|
29988
|
-
<p>
|
29999
|
+
<p>1.8.0
|
29989
30000
|
|
29990
30001
|
<div class="node">
|
29991
30002
|
<a name="W0633"></a>
|
@@ -30002,29 +30013,27 @@ Up: <a rel="up" accesskey="u" href="#Messages">Messages</a>
|
|
30002
30013
|
|
30003
30014
|
<h4 class="subsection">6.515.1 Message body</h4>
|
30004
30015
|
|
30005
|
-
<p>
|
30016
|
+
<p>Using ' character in `<code>#include "%s"</code>' directive makes undefined behavior.
|
30006
30017
|
|
30007
30018
|
<h4 class="subsection">6.515.2 Content</h4>
|
30008
30019
|
|
30009
|
-
<p
|
30010
|
-
|
30011
|
-
<p>Under construction.
|
30020
|
+
<p>Under construction.
|
30012
30021
|
|
30013
30022
|
<h4 class="subsection">6.515.3 Sample code</h4>
|
30014
30023
|
|
30015
|
-
<pre class="verbatim"
|
30024
|
+
<pre class="verbatim">#include "NG'_header.h" /* W0633 */
|
30016
30025
|
</pre>
|
30017
30026
|
|
30018
30027
|
<h4 class="subsection">6.515.4 Related message</h4>
|
30019
30028
|
|
30020
30029
|
<ul>
|
30021
|
-
<li><a href="#W0632">W0632</a>
|
30030
|
+
<li><a href="#W0632">W0632</a> Using ' or " characters in `#include <%s>' directive makes undefined behavior.
|
30022
30031
|
<li><a href="#W0634">W0634</a> `\' is used in `#include' line. `/' is recommended for the path delimiter.
|
30023
30032
|
</ul>
|
30024
30033
|
|
30025
30034
|
<h4 class="subsection">6.515.5 Since</h4>
|
30026
30035
|
|
30027
|
-
<p>
|
30036
|
+
<p>1.8.0
|
30028
30037
|
|
30029
30038
|
<div class="node">
|
30030
30039
|
<a name="W0634"></a>
|
@@ -30045,25 +30054,24 @@ Up: <a rel="up" accesskey="u" href="#Messages">Messages</a>
|
|
30045
30054
|
|
30046
30055
|
<h4 class="subsection">6.516.2 Content</h4>
|
30047
30056
|
|
30048
|
-
<p
|
30049
|
-
|
30050
|
-
<p>Under construction.
|
30057
|
+
<p>Under construction.
|
30051
30058
|
|
30052
30059
|
<h4 class="subsection">6.516.3 Sample code</h4>
|
30053
30060
|
|
30054
|
-
<pre class="verbatim"
|
30061
|
+
<pre class="verbatim">#include "..\ng\header.h" /* W0634 */
|
30062
|
+
#include "..\\ng\\header.h" /* W0634 */
|
30055
30063
|
</pre>
|
30056
30064
|
|
30057
30065
|
<h4 class="subsection">6.516.4 Related message</h4>
|
30058
30066
|
|
30059
30067
|
<ul>
|
30060
|
-
<li><a href="#W0632">W0632</a>
|
30061
|
-
<li><a href="#W0633">W0633</a>
|
30068
|
+
<li><a href="#W0632">W0632</a> Using ' or " characters in `#include <%s>' directive makes undefined behavior.
|
30069
|
+
<li><a href="#W0633">W0633</a> Using ' character in `#include "%s"' directive makes undefined behavior.
|
30062
30070
|
</ul>
|
30063
30071
|
|
30064
30072
|
<h4 class="subsection">6.516.5 Since</h4>
|
30065
30073
|
|
30066
|
-
<p>
|
30074
|
+
<p>1.8.0
|
30067
30075
|
|
30068
30076
|
<div class="node">
|
30069
30077
|
<a name="W0635"></a>
|
@@ -30375,14 +30383,17 @@ Up: <a rel="up" accesskey="u" href="#Messages">Messages</a>
|
|
30375
30383
|
|
30376
30384
|
<h4 class="subsection">6.524.2 Content</h4>
|
30377
30385
|
|
30378
|
-
<p
|
30379
|
-
|
30380
|
-
<p>Under construction.
|
30386
|
+
<p>Under construction.
|
30381
30387
|
|
30382
30388
|
<h4 class="subsection">6.524.3 Sample code</h4>
|
30383
30389
|
|
30384
|
-
<pre class="verbatim">
|
30385
|
-
|
30390
|
+
<pre class="verbatim">void func(void)
|
30391
|
+
{
|
30392
|
+
register int a[3];
|
30393
|
+
|
30394
|
+
int *p1 = a; /* W0642 */
|
30395
|
+
int *p2 = &a[1]; /* W0642 */
|
30396
|
+
}
|
30386
30397
|
</pre>
|
30387
30398
|
|
30388
30399
|
<h4 class="subsection">6.524.4 Related message</h4>
|
@@ -30396,7 +30407,7 @@ int* p = arr1;
|
|
30396
30407
|
|
30397
30408
|
<h4 class="subsection">6.524.5 Since</h4>
|
30398
30409
|
|
30399
|
-
<p>
|
30410
|
+
<p>1.8.0
|
30400
30411
|
|
30401
30412
|
<div class="node">
|
30402
30413
|
<a name="W0643"></a>
|
@@ -32995,9 +33006,9 @@ Up: <a rel="up" accesskey="u" href="#Messages">Messages</a>
|
|
32995
33006
|
<h4 class="subsection">6.565.4 Related message</h4>
|
32996
33007
|
|
32997
33008
|
<ul>
|
32998
|
-
<li><a href="#W0688">W0688</a> There is no line number in 1 to 32767 ranges after
|
32999
|
-
<li><a href="#W0689">W0689</a> #line
|
33000
|
-
<li><a href="#W0690">W0690</a>
|
33009
|
+
<li><a href="#W0688">W0688</a> There is no line number in 1 to 32767 ranges after #line directive.
|
33010
|
+
<li><a href="#W0689">W0689</a> #line directive syntax doesn't match `#line integer constant \"string\"'.
|
33011
|
+
<li><a href="#W0690">W0690</a> No line number after #line directive.
|
33001
33012
|
<li><a href="#W0691">W0691</a> The result of `##' operator is not valid preprocessing token.
|
33002
33013
|
</ul>
|
33003
33014
|
|
@@ -33020,7 +33031,7 @@ Up: <a rel="up" accesskey="u" href="#Messages">Messages</a>
|
|
33020
33031
|
|
33021
33032
|
<h4 class="subsection">6.566.1 Message body</h4>
|
33022
33033
|
|
33023
|
-
<p>There is no line number in 1 to 32767 ranges after
|
33034
|
+
<p>There is no line number in 1 to 32767 ranges after #line directive.
|
33024
33035
|
|
33025
33036
|
<h4 class="subsection">6.566.2 Content</h4>
|
33026
33037
|
|
@@ -33035,8 +33046,8 @@ Up: <a rel="up" accesskey="u" href="#Messages">Messages</a>
|
|
33035
33046
|
|
33036
33047
|
<ul>
|
33037
33048
|
<li><a href="#W0687">W0687</a> #undef is using to delete #defined operator.
|
33038
|
-
<li><a href="#W0689">W0689</a> #line
|
33039
|
-
<li><a href="#W0690">W0690</a>
|
33049
|
+
<li><a href="#W0689">W0689</a> #line directive syntax doesn't match `#line integer constant \"string\"'.
|
33050
|
+
<li><a href="#W0690">W0690</a> No line number after #line directive.
|
33040
33051
|
<li><a href="#W0691">W0691</a> The result of `##' operator is not valid preprocessing token.
|
33041
33052
|
</ul>
|
33042
33053
|
|
@@ -33059,7 +33070,7 @@ Up: <a rel="up" accesskey="u" href="#Messages">Messages</a>
|
|
33059
33070
|
|
33060
33071
|
<h4 class="subsection">6.567.1 Message body</h4>
|
33061
33072
|
|
33062
|
-
<p>#line
|
33073
|
+
<p>#line directive syntax doesn't match `#line integer constant \"string\"'.
|
33063
33074
|
|
33064
33075
|
<h4 class="subsection">6.567.2 Content</h4>
|
33065
33076
|
|
@@ -33077,8 +33088,8 @@ Up: <a rel="up" accesskey="u" href="#Messages">Messages</a>
|
|
33077
33088
|
|
33078
33089
|
<ul>
|
33079
33090
|
<li><a href="#W0687">W0687</a> #undef is using to delete #defined operator.
|
33080
|
-
<li><a href="#W0688">W0688</a> There is no line number in 1 to 32767 ranges after
|
33081
|
-
<li><a href="#W0690">W0690</a>
|
33091
|
+
<li><a href="#W0688">W0688</a> There is no line number in 1 to 32767 ranges after #line directive.
|
33092
|
+
<li><a href="#W0690">W0690</a> No line number after #line directive.
|
33082
33093
|
<li><a href="#W0691">W0691</a> The result of `##' operator is not valid preprocessing token.
|
33083
33094
|
</ul>
|
33084
33095
|
|
@@ -33101,7 +33112,7 @@ Up: <a rel="up" accesskey="u" href="#Messages">Messages</a>
|
|
33101
33112
|
|
33102
33113
|
<h4 class="subsection">6.568.1 Message body</h4>
|
33103
33114
|
|
33104
|
-
<p>
|
33115
|
+
<p>No line number after #line directive.
|
33105
33116
|
|
33106
33117
|
<h4 class="subsection">6.568.2 Content</h4>
|
33107
33118
|
|
@@ -33117,8 +33128,8 @@ Up: <a rel="up" accesskey="u" href="#Messages">Messages</a>
|
|
33117
33128
|
|
33118
33129
|
<ul>
|
33119
33130
|
<li><a href="#W0687">W0687</a> #undef is using to delete #defined operator.
|
33120
|
-
<li><a href="#W0688">W0688</a> There is no line number in 1 to 32767 ranges after
|
33121
|
-
<li><a href="#W0689">W0689</a> #line
|
33131
|
+
<li><a href="#W0688">W0688</a> There is no line number in 1 to 32767 ranges after #line directive.
|
33132
|
+
<li><a href="#W0689">W0689</a> #line directive syntax doesn't match `#line integer constant \"string\"'.
|
33122
33133
|
<li><a href="#W0691">W0691</a> The result of `##' operator is not valid preprocessing token.
|
33123
33134
|
</ul>
|
33124
33135
|
|
@@ -33158,9 +33169,9 @@ Up: <a rel="up" accesskey="u" href="#Messages">Messages</a>
|
|
33158
33169
|
|
33159
33170
|
<ul>
|
33160
33171
|
<li><a href="#W0687">W0687</a> #undef is using to delete #defined operator.
|
33161
|
-
<li><a href="#W0688">W0688</a> There is no line number in 1 to 32767 ranges after
|
33162
|
-
<li><a href="#W0689">W0689</a> #line
|
33163
|
-
<li><a href="#W0690">W0690</a>
|
33172
|
+
<li><a href="#W0688">W0688</a> There is no line number in 1 to 32767 ranges after #line directive.
|
33173
|
+
<li><a href="#W0689">W0689</a> #line directive syntax doesn't match `#line integer constant \"string\"'.
|
33174
|
+
<li><a href="#W0690">W0690</a> No line number after #line directive.
|
33164
33175
|
</ul>
|
33165
33176
|
|
33166
33177
|
<h4 class="subsection">6.569.5 Since</h4>
|
@@ -33752,13 +33763,14 @@ Up: <a rel="up" accesskey="u" href="#Messages">Messages</a>
|
|
33752
33763
|
|
33753
33764
|
<h4 class="subsection">6.584.2 Content</h4>
|
33754
33765
|
|
33755
|
-
<p
|
33756
|
-
|
33757
|
-
<p>Under construction.
|
33766
|
+
<p>Under construction.
|
33758
33767
|
|
33759
33768
|
<h4 class="subsection">6.584.3 Sample code</h4>
|
33760
33769
|
|
33761
|
-
<pre class="verbatim">
|
33770
|
+
<pre class="verbatim">int func(int a, int b, int c, int d)
|
33771
|
+
{
|
33772
|
+
return (a + b) > (c > d); /* W0711 */
|
33773
|
+
}
|
33762
33774
|
</pre>
|
33763
33775
|
|
33764
33776
|
<h4 class="subsection">6.584.4 Related message</h4>
|
@@ -33770,7 +33782,7 @@ Up: <a rel="up" accesskey="u" href="#Messages">Messages</a>
|
|
33770
33782
|
|
33771
33783
|
<h4 class="subsection">6.584.5 Since</h4>
|
33772
33784
|
|
33773
|
-
<p>
|
33785
|
+
<p>1.8.0
|
33774
33786
|
|
33775
33787
|
<div class="node">
|
33776
33788
|
<a name="W0712"></a>
|
@@ -33791,13 +33803,14 @@ Up: <a rel="up" accesskey="u" href="#Messages">Messages</a>
|
|
33791
33803
|
|
33792
33804
|
<h4 class="subsection">6.585.2 Content</h4>
|
33793
33805
|
|
33794
|
-
<p
|
33795
|
-
|
33796
|
-
<p>Under construction.
|
33806
|
+
<p>Under construction.
|
33797
33807
|
|
33798
33808
|
<h4 class="subsection">6.585.3 Sample code</h4>
|
33799
33809
|
|
33800
|
-
<pre class="verbatim">
|
33810
|
+
<pre class="verbatim">int func(int a, int b, int c, int d)
|
33811
|
+
{
|
33812
|
+
return (a > b) > (c + d); /* W0712 */
|
33813
|
+
}
|
33801
33814
|
</pre>
|
33802
33815
|
|
33803
33816
|
<h4 class="subsection">6.585.4 Related message</h4>
|
@@ -33809,7 +33822,7 @@ Up: <a rel="up" accesskey="u" href="#Messages">Messages</a>
|
|
33809
33822
|
|
33810
33823
|
<h4 class="subsection">6.585.5 Since</h4>
|
33811
33824
|
|
33812
|
-
<p>
|
33825
|
+
<p>1.8.0
|
33813
33826
|
|
33814
33827
|
<div class="node">
|
33815
33828
|
<a name="W0713"></a>
|
@@ -33830,13 +33843,14 @@ Up: <a rel="up" accesskey="u" href="#Messages">Messages</a>
|
|
33830
33843
|
|
33831
33844
|
<h4 class="subsection">6.586.2 Content</h4>
|
33832
33845
|
|
33833
|
-
<p
|
33834
|
-
|
33835
|
-
<p>Under construction.
|
33846
|
+
<p>Under construction.
|
33836
33847
|
|
33837
33848
|
<h4 class="subsection">6.586.3 Sample code</h4>
|
33838
33849
|
|
33839
|
-
<pre class="verbatim">
|
33850
|
+
<pre class="verbatim">int func(int a, int b, int c, int d)
|
33851
|
+
{
|
33852
|
+
return (a > b) > (c > d); /* W0713 */
|
33853
|
+
}
|
33840
33854
|
</pre>
|
33841
33855
|
|
33842
33856
|
<h4 class="subsection">6.586.4 Related message</h4>
|
@@ -33848,7 +33862,7 @@ Up: <a rel="up" accesskey="u" href="#Messages">Messages</a>
|
|
33848
33862
|
|
33849
33863
|
<h4 class="subsection">6.586.5 Since</h4>
|
33850
33864
|
|
33851
|
-
<p>
|
33865
|
+
<p>1.8.0
|
33852
33866
|
|
33853
33867
|
<div class="node">
|
33854
33868
|
<a name="W0714"></a>
|
@@ -33869,13 +33883,14 @@ Up: <a rel="up" accesskey="u" href="#Messages">Messages</a>
|
|
33869
33883
|
|
33870
33884
|
<h4 class="subsection">6.587.2 Content</h4>
|
33871
33885
|
|
33872
|
-
<p
|
33873
|
-
|
33874
|
-
<p>Under construction.
|
33886
|
+
<p>Under construction.
|
33875
33887
|
|
33876
33888
|
<h4 class="subsection">6.587.3 Sample code</h4>
|
33877
33889
|
|
33878
|
-
<pre class="verbatim"
|
33890
|
+
<pre class="verbatim">int func(int a, int b, int c, int d)
|
33891
|
+
{
|
33892
|
+
return (a > b) & (c > d); /* W0714 */
|
33893
|
+
}
|
33879
33894
|
</pre>
|
33880
33895
|
|
33881
33896
|
<h4 class="subsection">6.587.4 Related message</h4>
|
@@ -33889,7 +33904,7 @@ Up: <a rel="up" accesskey="u" href="#Messages">Messages</a>
|
|
33889
33904
|
|
33890
33905
|
<h4 class="subsection">6.587.5 Since</h4>
|
33891
33906
|
|
33892
|
-
<p>
|
33907
|
+
<p>1.8.0
|
33893
33908
|
|
33894
33909
|
<div class="node">
|
33895
33910
|
<a name="W0715"></a>
|
@@ -33910,13 +33925,14 @@ Up: <a rel="up" accesskey="u" href="#Messages">Messages</a>
|
|
33910
33925
|
|
33911
33926
|
<h4 class="subsection">6.588.2 Content</h4>
|
33912
33927
|
|
33913
|
-
<p
|
33914
|
-
|
33915
|
-
<p>Under construction.
|
33928
|
+
<p>Under construction.
|
33916
33929
|
|
33917
33930
|
<h4 class="subsection">6.588.3 Sample code</h4>
|
33918
33931
|
|
33919
|
-
<pre class="verbatim"
|
33932
|
+
<pre class="verbatim">int func(int a, int b, int c, int d)
|
33933
|
+
{
|
33934
|
+
return (a > b) | (c > d); /* W0715 */
|
33935
|
+
}
|
33920
33936
|
</pre>
|
33921
33937
|
|
33922
33938
|
<h4 class="subsection">6.588.4 Related message</h4>
|
@@ -33930,7 +33946,7 @@ Up: <a rel="up" accesskey="u" href="#Messages">Messages</a>
|
|
33930
33946
|
|
33931
33947
|
<h4 class="subsection">6.588.5 Since</h4>
|
33932
33948
|
|
33933
|
-
<p>
|
33949
|
+
<p>1.8.0
|
33934
33950
|
|
33935
33951
|
<div class="node">
|
33936
33952
|
<a name="W0716"></a>
|
@@ -34458,7 +34474,7 @@ enum Fruits { APPLE, BANANA, ORANGE };
|
|
34458
34474
|
void func(void)
|
34459
34475
|
{
|
34460
34476
|
enum Color c;
|
34461
|
-
|
34477
|
+
|
34462
34478
|
c = ORANGE; /* W0729 */
|
34463
34479
|
}
|
34464
34480
|
</pre>
|
@@ -38254,13 +38270,32 @@ Up: <a rel="up" accesskey="u" href="#Messages">Messages</a>
|
|
38254
38270
|
|
38255
38271
|
<h4 class="subsection">6.684.2 Content</h4>
|
38256
38272
|
|
38257
|
-
<p
|
38258
|
-
|
38259
|
-
<p>Under construction.
|
38273
|
+
<p>Under construction.
|
38260
38274
|
|
38261
38275
|
<h4 class="subsection">6.684.3 Sample code</h4>
|
38262
38276
|
|
38263
|
-
<pre class="verbatim"
|
38277
|
+
<pre class="verbatim">#define ASM_CODE asm("movl %ecx, %eax")
|
38278
|
+
|
38279
|
+
void foo(int arg1, int *arg2, int arg3)
|
38280
|
+
{
|
38281
|
+
asm("movl %ecx, %eax"); /* W0832 */
|
38282
|
+
__asm__("movl %ecx, (%eax)"); /* W0832 */
|
38283
|
+
|
38284
|
+
asm { /* W0832 */
|
38285
|
+
xorl eax, eax
|
38286
|
+
}
|
38287
|
+
|
38288
|
+
ASM_CODE; /* W0832 */
|
38289
|
+
|
38290
|
+
__asm__ volatile ( /* W0832 */
|
38291
|
+
"int $0x80"
|
38292
|
+
: "=a" (r)
|
38293
|
+
"+b" (arg1),
|
38294
|
+
"+c" (arg2),
|
38295
|
+
"+d" (arg3)
|
38296
|
+
: "a" (128)
|
38297
|
+
: "memory", "cc");
|
38298
|
+
}
|
38264
38299
|
</pre>
|
38265
38300
|
|
38266
38301
|
<h4 class="subsection">6.684.4 Related message</h4>
|
@@ -38271,7 +38306,7 @@ Up: <a rel="up" accesskey="u" href="#Messages">Messages</a>
|
|
38271
38306
|
|
38272
38307
|
<h4 class="subsection">6.684.5 Since</h4>
|
38273
38308
|
|
38274
|
-
<p>
|
38309
|
+
<p>1.8.0
|
38275
38310
|
|
38276
38311
|
<div class="node">
|
38277
38312
|
<a name="W0833"></a>
|