adlint 1.8.0 → 1.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/ChangeLog CHANGED
@@ -1,3 +1,23 @@
1
+ Mon May 7 22:56:02 2012 Yutaka Yanoh <yanoh@users.sourceforge.net>
2
+
3
+ * release.ga : 1.8.2
4
+ - Fix evaluation of array-subscript-expression not to convert the
5
+ derived array object into a pointer in order to resolve a type of
6
+ the nested array-subscript-expression correctly.
7
+
8
+ Sat May 5 02:50:24 2012 Yutaka Yanoh <yanoh@users.sourceforge.net>
9
+
10
+ * release.rc : 1.8.1
11
+ - This is RC for the 1st patch release of the 1.8 series.
12
+ - Fix evaluation of array-subscript-expression not to convert the
13
+ derived array object into a pointer in order to resolve a type of
14
+ the nested array-subscript-expression correctly.
15
+
16
+ Fri May 4 20:59:19 2012 Yutaka Yanoh <yanoh@users.sourceforge.net>
17
+
18
+ * lib/adlint/c/expr.rb : Fix evaluation of array-subscript-expression
19
+ not to convert the derived array object into a pointer variable.
20
+
1
21
  Fri Apr 27 17:29:22 2012 Yutaka Yanoh <yanoh@users.sourceforge.net>
2
22
 
3
23
  * release.ga : 1.8.0
@@ -15,7 +35,7 @@ Fri Apr 27 17:29:22 2012 Yutaka Yanoh <yanoh@users.sourceforge.net>
15
35
  - Add W0715 detection.
16
36
  - Add W0832 detection.
17
37
  - Fix W0629 detection not to warn when the translation-unit local
18
- function is referred to derive a pointer to the function.
38
+ function is referred only to derive a pointer to the function.
19
39
  - Fix W0459 and W0460 detections not to warn about inner variables
20
40
  owned by a temporary variable.
21
41
  - Fix W0461 and W0462 detections not to warn when the length omitted
data/NEWS CHANGED
@@ -21,6 +21,18 @@
21
21
 
22
22
  ++
23
23
 
24
+ === \AdLint 1.8.2 is released (2012-05-08)
25
+
26
+ ==== Changes since the 1.8.0 release
27
+
28
+ * Fix evaluation of array-subscript-expression not to convert the derived array
29
+ object into a pointer in order to resolve a type of the nested
30
+ array-subscript-expression correctly
31
+
32
+ See the file
33
+ {ChangeLog}[http://adlint.sourceforge.net/pmwiki/upload.d/Main/ChangeLog]
34
+ for more details.
35
+
24
36
  === \AdLint 1.8.0 is released (2012-04-27)
25
37
 
26
38
  ==== Changes since the 1.6.0 release
@@ -43,7 +55,7 @@
43
55
  * Fix W0459 and W0460 detections not to warn about inner variables owned by a
44
56
  temporary variable
45
57
  * Fix W0461 and W0462 detections not to warn when the length omitted array
46
- parameter is specified as an argument.
58
+ parameter is specified as an argument
47
59
  * Fix W1031 detection not to warn when the storage-class-specifier of the
48
60
  object declaration is explicitly specified and the storage-class-specifier of
49
61
  following object definition is omitted
@@ -61,10 +73,6 @@
61
73
  measurement
62
74
  * Improve value version management of the abstract interpreter
63
75
 
64
- See the file
65
- {ChangeLog}[http://adlint.sourceforge.net/pmwiki/upload.d/Main/ChangeLog]
66
- for more details.
67
-
68
76
  === \AdLint 1.6.0 is released (2012-04-06)
69
77
 
70
78
  ==== Changes since the 1.4.0 release
@@ -36,7 +36,7 @@
36
36
  # X9999: "Your custom message for the fatal error of #9999."
37
37
  # E9999: "Your custom message for the error of #9999."
38
38
 
39
- version: "1.8.0"
39
+ version: "1.8.2"
40
40
 
41
41
  message_definition:
42
42
  X0001: "An unknown exception `%s' is found."
@@ -36,7 +36,7 @@
36
36
  # X9999: "Your custom message for the fatal error of #9999."
37
37
  # E9999: "Your custom message for the error of #9999."
38
38
 
39
- version: "1.8.0"
39
+ version: "1.8.2"
40
40
 
41
41
  message_definition:
42
42
  X0001: "不明な例外条件 `%s' を検出しました。"
data/lib/adlint/c/expr.rb CHANGED
@@ -75,9 +75,7 @@ module C #:nodoc:
75
75
  end
76
76
 
77
77
  array_or_pointer = object
78
-
79
78
  result_type = array_or_pointer.type.unqualify.base_type
80
- result_type = pointer_type(result_type) if result_type.array?
81
79
 
82
80
  case
83
81
  when array_or_pointer.type.array?
@@ -26,7 +26,7 @@ def initialize(context, lexer)
26
26
  @lexer = lexer
27
27
  @symbol_table = context[:symbol_table]
28
28
  @token_array = []
29
- @unnamed_type_no = 0
29
+ @unnamed_tag_no = 0
30
30
  end
31
31
 
32
32
  attr_reader :token_array
@@ -71,7 +71,7 @@ def value_of(token)
71
71
  end
72
72
 
73
73
  def create_unnamed_tag_name(base_token)
74
- Token.new(:IDENTIFIER, "__adlint__unnamed_#{@unnamed_type_no += 1}",
74
+ Token.new(:IDENTIFIER, "__adlint__unnamed_#{@unnamed_tag_no += 1}",
75
75
  base_token.location)
76
76
  end
77
77
 
@@ -2034,7 +2034,7 @@ def initialize(context, lexer)
2034
2034
  @lexer = lexer
2035
2035
  @symbol_table = context[:symbol_table]
2036
2036
  @token_array = []
2037
- @unnamed_type_no = 0
2037
+ @unnamed_tag_no = 0
2038
2038
  end
2039
2039
 
2040
2040
  attr_reader :token_array
@@ -2079,7 +2079,7 @@ def value_of(token)
2079
2079
  end
2080
2080
 
2081
2081
  def create_unnamed_tag_name(base_token)
2082
- Token.new(:IDENTIFIER, "__adlint__unnamed_#{@unnamed_type_no += 1}",
2082
+ Token.new(:IDENTIFIER, "__adlint__unnamed_#{@unnamed_tag_no += 1}",
2083
2083
  base_token.location)
2084
2084
  end
2085
2085
 
@@ -33,8 +33,8 @@ module AdLint #:nodoc:
33
33
 
34
34
  MAJOR_VERSION = 1
35
35
  MINOR_VERSION = 8
36
- PATCH_VERSION = 0
37
- RELEASE_DATE = "2012-04-27"
36
+ PATCH_VERSION = 2
37
+ RELEASE_DATE = "2012-05-08"
38
38
 
39
39
  TRAITS_SCHEMA_VERSION = "1.0.0"
40
40
 
@@ -49,7 +49,7 @@ static int foo(const int i)
49
49
 
50
50
  for (j = 0; j != 10; j++) {
51
51
  array[j] = 0;
52
- array[j + 1] = 0;
52
+ array[j + 1] = 0; /* ADLINT::[-W0723] */
53
53
  if (j == 10) {
54
54
  break;
55
55
  }
@@ -10,5 +10,5 @@ static int foo(void)
10
10
 
11
11
  int func_1(const int i)
12
12
  {
13
- return func_2(g + i + foo());
13
+ return func_2(g + i + foo()); /* ADLINT::[-W0723] */
14
14
  }
@@ -3,10 +3,10 @@
3
3
  static int foo(const int i)
4
4
  {
5
5
  extern int func_1(const int);
6
- return func_3(i + 1) + func_1(i + 1);
6
+ return func_3(i + 1) + func_1(i + 1); /* ADLINT::[-W0723] */
7
7
  }
8
8
 
9
9
  int func_2(const int i)
10
10
  {
11
- return foo(i + 1);
11
+ return foo(i + 1); /* ADLINT::[-W0723] */
12
12
  }
@@ -2,5 +2,5 @@
2
2
 
3
3
  int func_3(const int i)
4
4
  {
5
- return func_1(i + 1);
5
+ return func_1(i + 1); /* ADLINT::[-W0723] */
6
6
  }
@@ -7,15 +7,25 @@ int foo(void)
7
7
 
8
8
  int bar(const int i) /* no caller of bar() in this project */
9
9
  {
10
- return i + 1;
10
+ if (i < 100) {
11
+ return i + 1;
12
+ }
13
+ else {
14
+ return 0;
15
+ }
11
16
  }
12
17
 
13
18
  int baz(const int i) /* no caller of baz() in this project */
14
19
  {
15
- return i * 2;
20
+ if (i < 100) {
21
+ return i + 2;
22
+ }
23
+ else {
24
+ return 1;
25
+ }
16
26
  }
17
27
 
18
28
  static int qux(void) /* no caller of qux() in this translation unit */
19
29
  {
20
- return 1;
30
+ return 2;
21
31
  }
@@ -1,8 +1,8 @@
1
1
  <html lang="ja">
2
2
  <head>
3
- <title>AdLint 1.8.0 開発者ガイド</title>
3
+ <title>AdLint 1.8.2 開発者ガイド</title>
4
4
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5
- <meta name="description" content="AdLint 1.8.0 開発者ガイド">
5
+ <meta name="description" content="AdLint 1.8.2 開発者ガイド">
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.8.0 開発者ガイド</h1>
47
+ <h1 class="settitle">AdLint 1.8.2 開発者ガイド</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.8.0 開発者ガイド
5
+ @settitle AdLint 1.8.2 開発者ガイド
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.8.0 User's Guide</title>
3
+ <title>AdLint 1.8.2 User's Guide</title>
4
4
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5
- <meta name="description" content="AdLint 1.8.0 User's Guide">
5
+ <meta name="description" content="AdLint 1.8.2 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.8.0 User's Guide</h1>
47
+ <h1 class="settitle">AdLint 1.8.2 User's Guide</h1>
48
48
  <div class="node">
49
49
  <a name="Top"></a>
50
50
  <p><hr>
@@ -2,7 +2,7 @@
2
2
  @setfilename users_guide_en.info
3
3
  @documentlanguage en
4
4
  @documentencoding utf-8
5
- @settitle AdLint 1.8.0 User's Guide
5
+ @settitle AdLint 1.8.2 User's Guide
6
6
 
7
7
  @copying
8
8
  Copyright (C) 2010-2012, OGIS-RI Co.,Ltd.
@@ -1,8 +1,8 @@
1
1
  <html lang="ja">
2
2
  <head>
3
- <title>AdLint 1.8.0 利用者ガイド</title>
3
+ <title>AdLint 1.8.2 利用者ガイド</title>
4
4
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5
- <meta name="description" content="AdLint 1.8.0 利用者ガイド">
5
+ <meta name="description" content="AdLint 1.8.2 利用者ガイド">
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.8.0 利用者ガイド</h1>
47
+ <h1 class="settitle">AdLint 1.8.2 利用者ガイド</h1>
48
48
  <div class="node">
49
49
  <a name="Top"></a>
50
50
  <p><hr>
@@ -2,7 +2,7 @@
2
2
  @setfilename users_guide_ja.info
3
3
  @documentlanguage ja
4
4
  @documentencoding utf-8
5
- @settitle AdLint 1.8.0 利用者ガイド
5
+ @settitle AdLint 1.8.2 利用者ガイド
6
6
 
7
7
  @copying
8
8
  Copyright (C) 2010-2012, OGIS-RI Co.,Ltd.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: adlint
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.0
4
+ version: 1.8.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-04-27 00:00:00.000000000 Z
12
+ date: 2012-05-08 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: ! 'AdLint is a source code static analyzer.
15
15