Commit message (Collapse)AuthorAgeFilesLines
* Novafora license grant using MIT license.NovaforaRobert Bedichek2009-04-141-0/+41
| | | | | | Novafora licenses IP formerly owned by Transmeta Corporation under the MIT license. (Novafora purchased Transmeta January of 2009.) signed-off-by: Robert Bedichek <rbedichek@novafora.com>
* Do a proper scope allocator, don't use the "bytes" allocator that doesn'tLinus Torvalds2005-04-073-2/+5
| | | | have any alignment guarantees.
* Fix case statement inlining. At least partly.Linus Torvalds2005-04-071-8/+4
* Flesh out inlining some more.Linus Torvalds2005-04-071-19/+72
| | | | | We still don't copy all symbols correctly, in particular branch target symbols (ie labels, case targets etc).l
* Fix a nonchecked (and much too small) nesting level limit.Linus Torvalds2005-04-071-2/+4
* Make it easier to add extra libraries (eg add a "-lefence" thing forLinus Torvalds2005-04-071-4/+5
| | | | allocation checking etc).
* Clean up function inlining some, and fix the type of theLinus Torvalds2005-04-073-62/+80
| | | | | argument symbols that got corrupted by the incorrect partial symbol copy when creating the new argument symbols.
* Make the statement copying slightly more complete, to get more coverage.Linus Torvalds2005-04-071-9/+105
| | | | Much still not implemented.
* Add "-v" flag for verbose mode.Linus Torvalds2005-04-074-3/+7
| | | | | | | Warn about internal "not implemented yet" kinds of things only when verbose. These warnings have nothing to do with the sources we're checking, they're only good for pointing out limitations of sparse itself.
* Install the kernel source checker as "sparse" in /usr/local/bin.Linus Torvalds2005-04-071-0/+9
| | | | | Calling it "check" is just too generic a name if we install it somewhere global.
* [PATCH] sparse type checking on function pointersDave Olien2005-04-071-0/+11
| | | | | | This patch fixes type checking on function arguments that are pointers to functions. We're supposed to be able to mix functions and function pointers interchangably.
* Add cheesy C++-like "const variable" evaluation. It's not C, butLinus Torvalds2005-04-072-2/+41
| | | | | | | | | | | | | | | it _should_ be Make beginnings of a statement copier, to start testing trival inline function replacement. The return symbol replacement doesn't work, but the theory is there. NOTE! I'm getting more and more convinced that the symbol replacement is a bad idea, and is should be doable some other way (ie by looking up symbols at _evaluation_ time rather than having to switch them around when inlining).
* Start doing real expression copying for the inliner. We need toLinus Torvalds2005-04-073-3/+110
| | | | | | | | | replace the symbols encounterd durign an expression copy, and this is the first step showing how. This doesn't get the multi-level inlining right, we'll get there some day. Also, it currently complains about subexpressions it can't copy yet, causing way too much verbosity for the kernel.
* [PATCH] Use $(CC) consistently throughout the MakefileRyan Anderson2005-04-071-1/+1
| | | | | | This patch makes compilation of sparse use the correct version of gcc throughout. (It doesn't seem to have caused any problems, but the current situation isn't strictly correct, so...)
* [PATCH] Make all the anonymous structures truly anonymousRyan Anderson2005-04-073-21/+21
| | | | | | This patch removes the type-names on the anonymous structures. This fixes compilation when using gcc-3.3 (Debian). Credit for identifying the fix goes to Arnaldo Carvalho de Melo <acme@conectiva.com.br>.
* Create "inline.c", which contains the function "copy_statement()",Linus Torvalds2005-04-074-7/+58
| | | | | | | | used for inlining. Right now the copying is totally broken, since we don't actually do any symbol replacement, but hey, we'll get there some day. Make "inline_function()" call the new copy_statement() function.
* Get rid of "#pragma" lines for now, while still keeping aLinus Torvalds2005-04-075-2/+34
| | | | | | | path to eventually start parsing them. Basic approach: we'll replace the pragma line with some kind of internal attribute-looking thing for the front end.
* Cleanup: factor out function body parsing into a function of its own.Linus Torvalds2005-04-071-24/+34
| | | | | Make the argument declaration use a proper iterator loop, instead of the old "symbol_iterate()" function pointer thing.
* Start doing inline function expansion.Linus Torvalds2005-04-072-2/+51
| | | | | NOTE! We only expand the arguments right now, we don't actually do the body of the function itself. It's a start, though.
* Handle more attributes now that we warn about stuff we don'tLinus Torvalds2005-04-071-3/+25
| | | | | recognize. Most of them we just throw away, but we'll eventually need to properly save away the information in the type.
* Fix type warning.Linus Torvalds2005-04-071-1/+1
* Peter Jones informs about the gcc "attribute((aligned))" behaviour:Linus Torvalds2005-04-073-4/+14
| | | | | | | | | "The compiler automatically sets the alignment for the declared variable or field to the largest alignment which is ever used for any data type on the target machine you are compiling for" So add the proper define to "target.h" and make it so.
* Give better warnings for attribute mis-parses.Linus Torvalds2005-04-071-12/+19
* Make function returns a bit more realisticLinus Torvalds2005-04-073-10/+52
* Simplify if-statements without even evaluating the false sideLinus Torvalds2005-04-073-5/+33
| | | | | | | for compile-time constant conditionals. This allows inline functions and macros to do "illegal" things, as long as it's compile-time deterministic that they aren't done.
* Don't try to give typdefs storage bits.Linus Torvalds2005-04-072-1/+8
* [PATCH] escape character extensionDave Olien2005-04-071-2/+23
| | | | | | | | | | | | | | | | | | | | | I added cases for the escape characters that show up in the 2.5.x kernel sources. One particular case (\<newline>), is a little more interesting. This is different from the other cases because the \<newline> character should never appear in the parsed string. As a first fix, I've made escapechar() call itself recursively. One flaw with this fix is that escapechar() will mark the first character on the second line of the input string as "escaped": /* Mark it as escaped */ value |= 0x100; but none of the callers to escapechar() ever use or preserve this information, so it might as well be dropped altogether or at least ignored for now.
* MOD_TOPLEVEL is storage information, and shouldn't percolateLinus Torvalds2005-04-071-1/+1
| | | | through typedefs.
* Define __STDC__ to let sources know we want proper ANSI C prototypes.Linus Torvalds2005-04-071-0/+1
* Don't ask about logging, the automatic checkin tools don't like that.Linus Torvalds2005-04-070-0/+0
* Check whether a parameter declaration is a type before tryingLinus Torvalds2005-04-071-0/+4
| | | | to parse it as a type.
* [PATCH] Get gcc internal header files path from gcc itselfRyan Anderson2005-04-072-4/+7
| | | | | | | This update (hopefully) will allow 'check' to find the appropriate, gcc-local include headers (dependent, of course, upon the system it was built on) It's still a hack, but at least it will work in a few more places.
* Fix enums. We can't turn _all_ enums into values, only the actualLinus Torvalds2005-04-072-2/+3
| | | | | | | | value symbols, of course. Make the enum symbols have the SYM_ENUM type, and check that properly at evaluate time (instead of checking the base type, which will be an enum for regular enum variables too, of course).
* Parse and evaluate gcc computed goto extensions: label addressingLinus Torvalds2005-04-078-7/+45
| | | | | | | | (&&label) and computed goto (goto *expr). Add label ctype for __label__ identifier. This is still quite broken (it should create a block-symbol in the NS_LABEL namespace, right now it creates a regular symbol).
* Fix include path ordering - check for local paths when givenLinus Torvalds2005-04-071-16/+16
| | | | a string name, while <xxxx.h> searches only the path.
* Print out the rigth filename when an open fails..Linus Torvalds2005-04-071-1/+1
* Merge penguin:src/parser into home.transmeta.com:/home/torvalds/parserLinus Torvalds2005-04-071-0/+26
| * Add a rudimentary "-E" flag handling to check.c.Linus Torvalds2005-04-071-0/+26
| |
* | Define a few more automatic defines that the kernel expects.Linus Torvalds2005-04-071-0/+2
| | | | | | | | | | Too many kernel files depend on silent compiler magic, for example "defined(__i386__)" instead of "defined(CONFIG_X86)".
* | Gahh... I really need to revisit the expansion recursion avoidance. Linus Torvalds2005-04-071-2/+4
|/ | | | | In the meantime this fixes some of it. The pre-processor is still a horrible mess.
* Stupid pre-processor bug #6981: Don't avoid recursivelyLinus Torvalds2005-04-071-2/+2
| | | | | | | | | | expanding the arguments, just the macro body. Otherwise a simple #define A(x) xx(x) A(A(x)) would decide that the "inner" A(x) was a recursive expansion.
* Remove the __builtin_constant_p() #define from check.c,Linus Torvalds2005-04-071-1/+0
| | | | since we now handle it natively.
* Fxi up the builtin function evaluation. We really just wantLinus Torvalds2005-04-073-10/+10
| | | | to return a success marker for it.
* Add support for evaluating builtin functions at compile time.Linus Torvalds2005-04-073-16/+75
| | | | | | This should also do the inline function expansion, but we still don't do that. For now we just do the "__builtin_constant_p()" as the only such function. We'll expand the repertoire some day.
* Parse C99 style 'for()' statements with variable declarations.Linus Torvalds2005-04-073-10/+25
* Clean up for/while/do parsing by separating them outLinus Torvalds2005-04-071-54/+71
| | | | | | | into functions of their own. This will make the C99 'for' syntax handling cleaner. Make 'statement()' static to parse.c.
* Fix silly switch printout bug - the "break" label shouldLinus Torvalds2005-04-071-1/+2
| | | | obviously be _after_ the switch statements, not before ;-)
* Make the switch case table printout look prettier and more readableLinus Torvalds2005-04-071-6/+6
| | | | | (it's really indexed by the case value, not the label value, so make that part more intuitive)
* Fix switch/case statement show-parse.Linus Torvalds2005-04-073-16/+19
* Add current directory to search path.Linus Torvalds2005-04-071-0/+4