1v0.4 (2007-09-15) 2================= 3 4I have tagged and tarballed Sparse 0.4, now available from 5http://kernel.org/pub/software/devel/sparse/dist/sparse-0.4.tar.gz, 6with sha1sum a77a10174c8cdb5314eb5000c1e4f24458848b91. 7 8Highlights and visible changes in this release: 9 10* The Sparse validation files have become an automated test suite, invoked via 'make check'. Thanks to Damien Lespiau for the initial 'test-suite' script. Also thanks to Pavel Roskin for ideas, discussion, and prototyping, and to the contributors of new test cases and test-suite metadata for existing test cases. 11* New backend 'c2xml' by Rob Taylor, which outputs an XML representation of the variable declarations, function declarations, and data structures in a C file. 12* 'sparse' and 'cgcc' now have manpages. 13* Warning changes: 14 * Warn on 'return <void expression>;' if given '-Wreturn-void'; off by default because the C99 standard permits this. 15 * Sparse now defaults to -Wno-do-while. 16 * Sparse now defaults to -Wdecl. 17 * -Wno-old-initializer turns off warnings about non-C99 struct initializers 18 * -Wno-non-pointer-null turns off warnings about using a plain integer as a NULL pointer 19 * Initializer entries defined twice and bitfields without explicit signs have changed from errors to warnings. 20* 'cgcc' no longer passes '-Wall' to 'sparse' if given '-Wall' on the command line. '-Wall' turns on all Sparse warnings, including experimental and noisy ones. Don't include it just because a project wants to pass '-Wall' to 'cc'. If you really want 'cgcc' to run 'sparse' with '-Wall', set 'CHECK='sparse -Wall'' 21* Support for more builtin functions: '__builtin_labs', '__builtin_offsetof', '__builtin_strcat', '__builtin_strncat', and '__builtin_strlen'. 22* Support for more attributes: 'constructor', 'destructor', '__always_inline__', '__noinline__', 'used', '__syscall_linkage__', 'format_arg', 'cdecl', 'stdcall', 'fastcall', 'dllimport', and 'dllexport'. 23* Support for the '__DATE__' and '__TIME__' preprocessor symbols. 24* Support for '__alignof' (treated like the existing '__alignof__'). 25* typeof(bitwise_type) now produces the same type, not an incompatible type; thanks to Al Viro. 26* Various profile-driven optimizations and changes to compiler optimization flags, making Sparse significantly faster. 27* Numerous fixes to C standards compliance, thanks to Al Viro. In particular: 28 * Sparse now requires integer constant expressions in various places, not arbitrary expressions. 29 * Sparse now handles NULL pointer constants more correctly. 30 * Sparse now resolves pointer types more correctly in conditional expressions 31* The 'graph' backend now outputs significantly better program graphs, and the Sparse source code includes some 'gvpr' scripts to modify these graphs in various ways, such as only showing the callers or callees of particular functions. Thanks to Dan Sheridan. 32* Linux-style 'make' output; for a more verbose make with full command lines, 'make V=1'. Thanks to Damien Lespiau. 33* Numerous bugfixes and internal cleanups; thanks to the many Sparse contributors. 34 35Full changelog: 36 37Al Viro (51): 38 * handle __alignof as equivalent of __alignof__ 39 * saner reporting of overlaps in initializers 40 * check for whitespace before object-like macro body 41 * fix alignment for _Bool 42 * fix interaction of typeof with bitwise types 43 * better recovery from bad operations on bitwise 44 * make copying of EXPR_INDEX non-lazy 45 * tie the fields of struct in simple list 46 * rewrite of initializer handling 47 * fix handling of typeof on structs 48 * missing NULL checks in initializer handling 49 * take cast_to() out of usual_conversions(), do it in callers 50 * mechanically split compatible_assignment_types() 51 * null pointer constants have no special meaning for pointer subtraction 52 * remove long-dead variable in evaluate_ptr_add() 53 * remove useless argument in evaluate_ptr_sub() 54 * cleanup of evaluate_assign_op() 55 * clean up the typechecking in arithmetics 56 * clean up usual_conversions(), kill evaluate_shift() 57 * fix index conversions in evaluate_ptr_add() 58 * fix default argument promotion 59 * move degenerate() down into compatible_assignment_types() 60 * in case of compound literal we want to delay examining type 61 * warn on return <void expression>; 62 * deal with enum members without excessive PITA 63 * implement __builtin_offsetof() 64 * fix handling of integer constant expressions 65 * fix the comma handling in integer constant expressions 66 * first pass at null pointer constants 67 * make size_t better approximate the reality 68 * fix handling of address_space in casts and assignments 69 * fix handling of pointers in ?: 70 * saner show_type() 71 * clean up evaluate_sign() 72 * integer_promotions() can't get SYM_NODE or SYM_ENUM 73 * start cleaning type_difference() 74 * get compatible_assignment_types() deal with all cases 75 * fix the sanity check in evaluate_ptr_sub() 76 * rewrite type_difference() 77 * deal correctly with qualifiers on arrays 78 * add __builtin_strlen() 79 * no such thing as array of functions 80 * new helper: unfoul() 81 * handling of typeof in evaluate_member_dereference() 82 * file and global scopes are the same for purposes of struct redefining 83 * ...,array should degenerate 84 * sanitize evaluate_ptr_add(), start checking for pointers to functions 85 * fix evaluate_compare() 86 * sanitize evaluate_postop() 87 * saner -Wtypesign 88 * braino in conditional_expression() 89 90Alberto Bertogli (1): 91 * Implement x86-64 support in cgcc. 92 93Alexey Dobriyan (2): 94 * Fix infinite loop in free_preprocessor_line() 95 * Fix -E handling 96 97Christopher Li (2): 98 * combinations string clean up 99 * Pass a bitmask of keywords to handle_attributes 100 101Damien Lespiau (6): 102 * Change sparse homepage in ctags headers. 103 * __DATE__ & __TIME expansion 104 * Beautify all & install Makefile targets 105 * test-suite: a tiny test automation script 106 * test-suite documentation 107 * Sample test-suite test cases 108 109Dan Sheridan (2): 110 * Improved graph generation using subgraph clusters for functions 111 * Add gvpr-based post-processing for graphs 112 113Josh Triplett (118): 114 * Fix website and repository references in FAQ 115 * Fix the version number 116 * Remove old version note. 117 * gitweb lives at git.kernel.org now. 118 * Add a "make dist" that requires $(VERSION) to match 'git describe' 119 * Add test case for __asm__ __volatile__(...) 120 * Make cgcc not pass -Wall to sparse even if passing it to cc 121 * Teach cgcc about all currently existing sparse warning options 122 * Teach cgcc about -ventry and -vdead 123 * Parse asm after a label as a statement, not an attribute 124 * Add test case for stdcall and cdecl attributes. 125 * Add -Wno-old-initializer to turn off warnings about non-C99 struct initializers 126 * Add test case for -Wno-old-initializer 127 * Revert unintentional inclusion of warning fix in previous commit. 128 * Use %td when printing a ptrdiff_t to avoid problems on 64-bit platforms 129 * Remove extra space. 130 * Add shebang to gvpr scripts, make them executable, and change usage accordingly 131 * Fix an __attribute__() parsing error 132 * Expand calling convention test case to cover fastcall 133 * Add -Wno-non-pointer-null to turn off warning about using a plain integer as a NULL pointer 134 * Add __builtin_strcat and __builtin_strncat. 135 * Ignore the GCC constructor and destructor attributes 136 * Remove inaccurate comment designating some attributes as windows-specific. 137 * Move the ident for defined() into the preprocessor section. 138 * Reorganize attribute list for readability. 139 * Add double-underscore variant __always_inline__. 140 * Add double-underscore variant __noinline__. 141 * Add no-double-underscore variant "used", ignored like "__used__". 142 * Add double-underscore variant __syscall_linkage__. 143 * Add no-double-underscore variant format_arg. 144 * Add explanatory comment about direct use of __IDENT for preprocessor idents. 145 * Sparse always defines __STDC__ 1, so cgcc does not need to do so 146 * Fix old typo: s/wierd/weird/ 147 * Canonicalize URL in FAQ: add www., add trailing slash 148 * Change "LD" to "LINK" in Makefile prettyprinting. 149 * Makefile prettyprinting: make INSTALL and other output line up correctly 150 * Add test case for infinite loop in free_preprocessor_line() 151 * Turn on -Wdecl by default. 152 * ctags: Use const as appropriate in cmp_sym() 153 * validation/old-initializer.c: Make the_s static to avoid extraneous warning. 154 * validation/restricted-typeof.c: Make globals static to avoid extraneous warnings. 155 * validation/escapes.c: Make globals static to avoid extraneous warnings. 156 * validation/non-pointer-null.c: Make global static to avoid extraneous warning. 157 * Merge commit 'viro/integer-constant' 158 * Move all the preprocessor tests into validation/preprocessor/ 159 * Move test-suite output files to validation/.gitignore 160 * .gitignore: Stop ignoring all dotfiles 161 * validation: Update comments for current Sparse behavior and test-suite. 162 * Add test-suite comments to all the obvious preprocessor tests 163 * Make preprocessor-loop a normal numbered preprocessor test 164 * Add test-suite comment to preprocessor21. 165 * Add test-suite comment to address_space.c 166 * Make clean depend on clean-check 167 * Rename asm-volatile to better describe what it tests 168 * Add test-suite comment to label-asm.c 169 * Remove "check-exit-value: 0" and rely on default; remove extra blank line. 170 * Add test-suite comment to bad-array-designated-initializer.c 171 * Add c2xml to .gitignore 172 * Split c2xml build rule into compile and link stages, and add the quiet prefixes 173 * expression.h needs lib.h for struct position and symbol.h for int_ctype 174 * Fix GCC warnings in c2xml 175 * Fix sparse warnings in c2xml: mark globals static and remove unused globals 176 * Fix test-suite to handle stdout and stderr separately, and fix up tests 177 * Add test-suite metadata to bad-cast.c 178 * Add test-suite metadata to bad-ternary-cond.c, and remove now-redundant comment 179 * Add test-suite metadata to initializer-entry-defined-twice.c 180 * Add test-suite metadata to context.c 181 * Add test-suite metadata to escapes.c 182 * Add test-suite metadata to calling-convention-attributes.c 183 * Fix typos in test-suite documentation 184 * Makefile: stop cleaning files we didn't make and have no business cleaning 185 * Add test-suite metadata to old-initializer.c; also test with -Wno-initializer 186 * allocate.h: Stop needlessly returning a void value in __DO_ALLOCATOR 187 * Turn off -Wdo-while by default. 188 * Add test-suite metadata to label-attr.c 189 * validation/builtin_safe1.c: Show the unsafe macro argument 190 * Make "Initializer entry defined twice" a warning, not an error 191 * Remove explicit restatements of defaults in metadata for member_of_typeof test 192 * Remove explicit restatements of defaults in metadata for outer-scope test 193 * Remove explicit restatements of defaults in metadata for comma test 194 * Add test case for comparing null pointer constant to int. 195 * Makefile: Use -O2 -finline-functions, not just -O 196 * cse: Size insn_hash_table more realistically, speeding up CSE significantly 197 * Add some missing dependencies in the Makefile 198 * Drop -fpic; it hurts performance and we don't build libsparse.so by default 199 * Add another test case to validation/comma.c 200 * ctags: Handle some new namespaces and symbol types. 201 * is_zero_constant: declare saved const 202 * Add test case for -Wtypesign 203 * Sort warning options in lib.c and lib.h 204 * Rename Wcast_to_address_space to Wcast_to_as to match the command-line argument 205 * Add a manpage for sparse 206 * Install the Sparse manpage 207 * cgcc: Sparse accepts -Wcast-to-as, not -Wcast-to-address-space 208 * Rename Wundefined_preprocessor to Wundef to match the command-line argument 209 * cgcc: Sparse accepts -Wundef, not -Wundefined-preprocessor 210 * Use -fno-strict-aliasing, as the ptrlist code seems to violate C99 strict aliasing rules 211 * Add test-suite annotations to restricted-typeof.c 212 * Add test-suite annotations to double-semicolon.c 213 * Add test-suite annotations to check_byte_count-ice.c 214 * Add test-suite annotations to badtype4.c 215 * Add test-suite annotations to varargs1.c 216 * Add test-suite annotations to struct-attribute-placement.c 217 * Add test-suite annotations to non-pointer-null.c 218 * Add test-suite annotations to struct-ns1.c 219 * Add test-suite annotations to noderef.c 220 * Makefile: Use ?= to allow overriding OS or AR on the Make command line 221 * FAQ: Point to URL on vger for subscription instructions and archives 222 * README: recode from ISO-8859-1 to UTF-8 223 * validation: Rename typeconvert.c to integer-promotions.c to match its purpose 224 * Add test-suite annotations to integer-promotions.c 225 * Add test-suite annotations to cond_expr.c 226 * Add test-suite annotations to function-pointer-modifier-inheritance.c 227 * validation: Update comment in type1.c to reflect current state of Sparse 228 * Add test-suite annotations to init-char-array.c 229 * Add a manpage for cgcc 230 * Add SEE ALSO for cgcc in sparse manpage 231 * Makefile: VERSION=0.4 232 233Kovarththanan Rajaratnam (1): 234 * libxml compile fix on Cygwin 235 236Michael Stefaniuc (3): 237 * Ignore the cdecl and stdcall attributes for now. 238 * Add test for typedef on pointer to function with stdcall attribute. 239 * '\?' is a valid escape character defined by ANSI C. Its value is '?'. 240 241Mike Frysinger (1): 242 * Makefile: improve flag handling 243 244Pavel Roskin (5): 245 * Improve error message if using a member of an incomplete struct or union 246 * Bitfield without explicit sign should be a warning, not an error 247 * cgcc: preserve sparse exit code if -no-compile is used 248 * Avoid use of libc headers in the validation suite 249 * Fix warnings about undeclared globals, they are irrelevant to the test 250 251Ramsay Jones (2): 252 * Add (more) support for WIN32 attribute names 253 * Add cygwin support to cgcc 254 255Randy Dunlap (1): 256 * add __builtin_labs() 257 258Rob Taylor (4): 259 * add end position to symbols 260 * add sparse_keep_tokens api to lib.h 261 * new get_type_name function 262 * add c2xml program 263 264Yura Pakhuchiy (1): 265 * Make cgcc filter out all sparse warning related options 266 267ricknu-0@student.ltu.se (4): 268 * tokenize.c: Replace handwritten strncmp with existing function. 269 * expression.c: Clean up match_oplist() and add missing va_end() 270 * parse.c: Adding va_end(). 271 * tokenize.c: Simplify drop_stream_eoln(). 272 273-- Josh Triplett 274