aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/evaluate.c
AgeCommit message (Expand)AuthorFilesLines
2022-06-24fix "unreplaced" warnings caused by using typeof() on inline functionsLuc Van Oostenryck1-1/+1
2021-04-19remove early simplification of casts during evaluationLuc Van Oostenryck1-43/+1
2021-03-05Merge branch 'slice'Luc Van Oostenryck1-1/+0
2021-02-28slice: remove unneeded nr_nrbits from EXPR_SLICELuc Van Oostenryck1-1/+0
2021-02-24fix eval of the assignment of a non-restricted value to a restricted variableLuc Van Oostenryck1-1/+1
2020-11-19Merge branches 'cleanup-postop' and 'cleanup-linearize'Luc Van Oostenryck1-2/+1
2020-11-19simplify unrestricted postopLuc Van Oostenryck1-2/+1
2020-11-18unqual: statement expressions should drop qualifiersLuc Van Oostenryck1-1/+1
2020-11-18unqual: comma expressions should drop qualifiersLuc Van Oostenryck1-1/+1
2020-11-18unqual: unqualify_type() should check for null ctypesLuc Van Oostenryck1-0/+2
2020-11-18casts should drop qualifiersLuc Van Oostenryck1-0/+13
2020-10-19Merge branch 'warn-address-builtin' into nextLuc Van Oostenryck1-0/+4
2020-10-16fix null pointer deref on return expression with invalid typeLuc Van Oostenryck1-1/+1
2020-10-16warn when taking the address of a built-in functionLuc Van Oostenryck1-0/+4
2020-10-09Merge branch 'usual-conv'Luc Van Oostenryck1-31/+36
2020-10-08fix usual conversion of integersLuc Van Oostenryck1-31/+34
2020-10-08fix evaluation of pointer to bool conversionsLuc Van Oostenryck1-0/+2
2020-10-01flex-array: warn when using sizeof() on a flexible arrayLuc Van Oostenryck1-0/+3
2020-08-18Merge branch 'union-cast' into masterLuc Van Oostenryck1-20/+68
2020-08-18Merge branch 'pointer-arith' into masterLuc Van Oostenryck1-2/+2
2020-08-18Merge branch 'past-deep'Luc Van Oostenryck1-2/+2
2020-08-18remove unneeded predeclaration of evaluate_cast()Luc Van Oostenryck1-2/+0
2020-08-17fix evaluate_ptr_add() when sizeof(offset) != sizeof(pointer)Luc Van Oostenryck1-2/+2
2020-08-17union-cast: teach sparse about union castsLuc Van Oostenryck1-1/+46
2020-08-15union-cast: extract evaluate_compound_literal()Luc Van Oostenryck1-19/+22
2020-08-09Merge branch 'check-void' into tipLuc Van Oostenryck1-1/+1
2020-08-09fix checking if type is voidLuc Van Oostenryck1-1/+1
2020-08-08Merge branch 'wstring-init' into nextLuc Van Oostenryck1-10/+15
2020-08-08warning: conditionalize "advancing past deep designator"Luc Van Oostenryck1-2/+2
2020-08-08Merge branch 'sync-cas' into nextLuc Van Oostenryck1-4/+3
2020-08-08wstring: call is_string_type() only when neededLuc Van Oostenryck1-3/+2
2020-08-08wstring: extend is_string_type() to also detect wide stringsLuc Van Oostenryck1-1/+4
2020-08-08wstring: add support for checking size in string initializerLuc Van Oostenryck1-2/+4
2020-08-08wstring: add support for evaluation of wide stringLuc Van Oostenryck1-4/+5
2020-08-07export evaluate_arguments()Luc Van Oostenryck1-4/+3
2020-08-06shift-assign: restrict shift count to unsigned intLuc Van Oostenryck1-0/+5
2020-08-06shift-assign: fix linearization of shift-assignLuc Van Oostenryck1-1/+5
2020-07-13fix evaluation error with assignment of qualified arraysLuc Van Oostenryck1-2/+2
2020-07-04add support for arch specific asm constraintsLuc Van Oostenryck1-1/+4
2020-07-04avoid multiple warnings when inlining undeclared callsLuc Van Oostenryck1-0/+4
2020-06-23gensel: remove unneeded test/uninitialized warningLuc Van Oostenryck1-3/+1
2020-06-20gensel: validate the type of the associationsLuc Van Oostenryck1-0/+20
2020-06-20gensel: controlling expression must be pointer-convertedLuc Van Oostenryck1-1/+3
2020-06-19gensel: controlling expression must be lvalue convertedLuc Van Oostenryck1-1/+4
2020-06-19gensel: use temporary variable in generic selectionLuc Van Oostenryck1-2/+4
2020-06-09generic: fix crash when nothing matchLuc Van Oostenryck1-2/+6
2020-06-03univ-init: scalar initializer needs some additional checksLuc Van Oostenryck1-0/+3
2020-05-30evaluate: mark evaluate_generic_selection() as staticRamsay Jones1-1/+1
2020-05-28add support for _GenericLuc Van Oostenryck1-0/+36
2020-05-21bad-goto: check declaration of label expressionsLuc Van Oostenryck1-0/+1
2020-05-21bad-goto: extract check_label_declaration()Luc Van Oostenryck1-6/+16
2020-05-21bad-goto: catch labels with reserved namesLuc Van Oostenryck1-0/+2
2020-05-21bad-goto: do not linearize function with undeclared labelsLuc Van Oostenryck1-0/+1
2020-05-21bad-goto: simplify testing of undeclared labelsLuc Van Oostenryck1-1/+2
2020-05-21bad-goto: reorg test in evaluate_goto_statement()Luc Van Oostenryck1-3/+7
2020-05-21misc: always use the node for current_fnLuc Van Oostenryck1-2/+2
2020-05-21misc: s/fntype/rettype/Luc Van Oostenryck1-5/+6
2020-02-09do the tree inlining during expansion phaseLuc Van Oostenryck1-16/+0
2019-12-17Merge branch 'msg-wrong-redecl' into nextLuc Van Oostenryck1-3/+5
2019-12-17Merge branch 'eval-typeof' into nextLuc Van Oostenryck1-4/+6
2019-12-17Merge branch 'expand-init' (early part) into nextLuc Van Oostenryck1-4/+12
2019-12-15improve diagnostic message about wrong redeclarationLuc Van Oostenryck1-3/+5
2019-12-15typeof: do not let classify_type() do its own SYM_TYPEOF expansionLuc Van Oostenryck1-4/+2
2019-12-15mark strings as examined & evaluatedLuc Van Oostenryck1-0/+4
2019-12-10degenerated arrays & functions are addressable tooLuc Van Oostenryck1-0/+1
2019-12-10fix addressability marking in evaluate_addressof()Luc Van Oostenryck1-0/+2
2019-12-10extract mark_addressable() from evaluate_addressof().Luc Van Oostenryck1-4/+9
2019-12-09Merge branch 'premature-examine' into nextLuc Van Oostenryck1-1/+1
2019-12-09fix premature examination of dereferenced objectLuc Van Oostenryck1-1/+1
2019-11-28remove redundant degenerate() in compatible_assignment_types()Luc Van Oostenryck1-1/+1
2019-11-26Merge branch 'parse-spec' into masterLuc Van Oostenryck1-11/+8
2019-11-25spec: get rid of all specifier MOD_XXXLuc Van Oostenryck1-11/+8
2019-11-19fix assignment check with function attributeLuc Van Oostenryck1-2/+6
2019-11-19fix assignment: pointer to __pure/__noreturn function to void *Luc Van Oostenryck1-1/+1
2019-11-03fix pointer casts in evaluate_compare()Xi Wang1-4/+4
2019-09-30asm: warn on invalid empty constraintsLuc Van Oostenryck1-0/+3
2019-09-30Merge branch 'fix-expand-asm' into tipLuc Van Oostenryck1-40/+118
2019-09-28asm: arrays & functions in non-memory operand degenerate into pointersLuc Van Oostenryck1-0/+3
2019-09-27asm: missing evaluation of asm statementsLuc Van Oostenryck1-0/+18
2019-09-27asm: use parse_asm_constraint() to verify constraintsLuc Van Oostenryck1-20/+15
2019-09-27asm: parse constraintsLuc Van Oostenryck1-2/+74
2019-09-27asm: use a specific struct for asm operandsLuc Van Oostenryck1-4/+1
2019-09-27asm: check earlier that body & constraints are stringsLuc Van Oostenryck1-11/+3
2019-09-26expand: add missing expansion of compound literalsLuc Van Oostenryck1-0/+1
2019-09-26shorter message for non-scalar in conditionalsLuc Van Oostenryck1-1/+1
2019-09-26more consistent type info in error messagesLuc Van Oostenryck1-10/+10
2019-09-02constexpr: relax constexprness of constant conditionalsLuc Van Oostenryck1-13/+15
2019-04-01fix allowing casts of AS pointers to uintptr_tLuc Van Oostenryck1-2/+2
2019-03-30also accept casts of AS pointers to uintptr_tLuc Van Oostenryck1-1/+1
2019-03-27evaluate: externally_visible functions don't need a declarationJann Horn1-1/+1
2019-02-28remove confusing intermediate 'where' in evaluate_assignment()Luc Van Oostenryck1-2/+1
2019-02-28display extra info for type errors in compare & conditionalLuc Van Oostenryck1-2/+6
2019-02-25evaluate: sizeof(bool) could be larger than sizeof(char)Luc Van Oostenryck1-1/+1
2019-02-17Merge branch 'branch-v0.6'Luc Van Oostenryck1-1/+1
2019-01-10is_null_pointer_constant(): replace magic constant by enumAurelien Aptel1-8/+14
2018-12-29explain cause of 'incorrect type in conditional'Luc Van Oostenryck1-1/+1
2018-12-20remove redundant check of _Bool bitsizeLuc Van Oostenryck1-1/+1
2018-12-17add a flag to warn on casts to/from bitwise pointersLuc Van Oostenryck1-0/+19
2018-12-12as-named: warn on bad address spaceLuc Van Oostenryck1-7/+7
2018-12-12as-name: use idents for address spacesLuc Van Oostenryck1-21/+24
2018-12-09as-name: add and use show_as()Luc Van Oostenryck1-3/+3
2018-09-26print address space number for cast-from-AS warningsVincenzo Frascino1-1/+1
2018-09-01stricter warning for explicit cast to ulongLuc Van Oostenryck1-2/+2
2018-07-23big-shift: fix evaluation of shift-assignLuc Van Oostenryck1-0/+5
2018-06-23cast: force_cast are OK on non-scalar valuesLuc Van Oostenryck1-6/+6
2018-06-23cast: rename evaluate_cast()'s vars with slightly more meaningful namesLuc Van Oostenryck1-48/+48
2018-06-04Merge branches 'label-redef', 'goto-reserved', 'errmsg-builtin-pos', 'fix-bui...Luc Van Oostenryck1-1/+33
2018-06-01fix crash on 'goto <reserved word>'Luc Van Oostenryck1-1/+1
2018-05-27Merge branch 'vla-sizeof' into tipLuc Van Oostenryck1-0/+32
2018-05-27vla-sizeof: add support for sizeof of VLAsLuc Van Oostenryck1-0/+32
2018-05-21Merge branch 'doc-sphinx' into tipLuc Van Oostenryck1-0/+1
2018-05-21api: move evaluate interface to its own header fileLuc Van Oostenryck1-0/+1
2018-05-01export check_duplicates()Luc Van Oostenryck1-1/+1
2018-04-11sparse: add -Wpointer-arith flag to toggle sizeof(void) warningsJoey Pabalinas1-2/+4
2018-04-11doc: copy-edit text related to applying sizeof to a _BoolJoey Pabalinas1-1/+1
2018-02-20ban use of 'true' or 'false'Luc Van Oostenryck1-12/+12
2018-02-01always evaluate both operandsLuc Van Oostenryck1-9/+9
2018-02-01do not report bad types twiceLuc Van Oostenryck1-1/+6
2018-02-01add helpers: valid_expr_type() & valid_subexpr_type()Luc Van Oostenryck1-0/+11
2018-02-01use valid_type to avoid to warn twice on conditionalsLuc Van Oostenryck1-1/+1
2018-02-01early return if null ctype in evaluate_conditional()Luc Van Oostenryck1-17/+15
2018-02-01fix error in bad conditionalLuc Van Oostenryck1-1/+3
2018-01-31report type & size on non-power-of-2 pointer subtractionLuc Van Oostenryck1-1/+3
2017-12-21Merge branches 'deref-fun-ptr' and 'deref-base-type' into tipLuc Van Oostenryck1-0/+1
2017-12-21dereference of a function is a no-opLuc Van Oostenryck1-0/+3
2017-12-21avoid unneeded alloc on error pathLuc Van Oostenryck1-1/+2
2017-12-21fix: evaluate_dereference() unexamined base typeLuc Van Oostenryck1-0/+1
2017-12-08fix: add missing degenerate() for logical notLuc Van Oostenryck1-0/+1
2017-11-11Merge branches 'volatile-loads-are-side-effects', 'fix-volatile-simplificatio...Luc Van Oostenryck1-49/+35
2017-11-08define MOD_QUALIFIER for (MOD_CONST | MOD_VOLATILE)Luc Van Oostenryck1-1/+1
2017-09-17use a specific struct for asm operandsLuc Van Oostenryck1-48/+34
2017-08-28Merge remote-tracking branch 'luc/constexpr-v4' into masterChristopher Li1-54/+152
2017-08-04fix: give a type to bad cond expr with known conditionLuc Van Oostenryck1-0/+12
2017-06-15fix: add missing examine in evaluate_dereference()Luc Van Oostenryck1-0/+2
2017-06-14Merge branches 'quiets-bool-cast-restricted-v3', 'error-vs-warnings-v2', 'imp...Luc Van Oostenryck1-1/+2
2017-06-10finer control over error vs. warningsLuc Van Oostenryck1-0/+1
2017-05-19Merge branches 'dump-macros-v2', 'fix-predefined-size', 'fix-bool-context', '...v0.5.1-rc1Luc Van Oostenryck1-1/+1
2017-05-19avoid warning on explicit 'bool <- restricted' castsLuc Van Oostenryck1-3/+10
2017-05-19returns the correct type when evaluating NULLLuc Van Oostenryck1-1/+1
2017-05-11avoid useless warning for 'bool <- restricted type' conversionLuc Van Oostenryck1-0/+6
2017-03-31give default return type in evaluate_call()Luc Van Oostenryck1-1/+1
2017-03-31return an error if too few argsLuc Van Oostenryck1-1/+3
2017-03-31constexpr: treat comparisons between types as integer constexprNicolai Stange1-4/+9
2017-03-31constexpr: support compound literals as address constantsNicolai Stange1-0/+2
2017-03-31constexpr: relax some constant expression rules for pointer expressionsNicolai Stange1-2/+27
2017-03-31constexpr: examine constness of __builtin_offsetof at evaluation onlyNicolai Stange1-2/+6
2017-03-31constexpr: recognize string literals as address constantsNicolai Stange1-0/+1
2017-03-31constexpr: recognize members of static compound objects as address constantsNicolai Stange1-0/+6
2017-03-31constexpr: recognize address constants created through pointer arithmeticNicolai Stange1-0/+7
2017-03-31constexpr: recognize address constants created through castsNicolai Stange1-0/+7
2017-03-31constexpr: recognize static objects as address constantsNicolai Stange1-1/+2
2017-03-31constexpr: check static storage duration objects' intializers' constnessNicolai Stange1-0/+10
2017-03-31constexpr: collect storage modifiers of initializersLuc Van Oostenryck1-6/+7
2017-03-31constexpr: rename handle_simple_initializer() to handle_initializer()Luc Van Oostenryck1-4/+4
2017-03-31constexpr: add support for tagging address constantsNicolai Stange1-1/+18
2017-03-31constexpr: examine constness of conditionals at evaluation onlyNicolai Stange1-6/+2
2017-03-31constexpr: examine constness of preops at evaluation onlyNicolai Stange1-4/+4
2017-03-31constexpr: examine constness of binops and alike at evaluation onlyNicolai Stange1-13/+6
2017-03-31constexpr: examine constness of casts at evaluation onlyNicolai Stange1-8/+29
2017-03-31constexpr: introduce additional expression constness tracking flagsNicolai Stange1-26/+26
2017-03-22fix evaluation of a function or array symbol in conditionalsLuc Van Oostenryck1-0/+1
2017-03-22warn if testing the address of an arrayLuc Van Oostenryck1-0/+3
2017-03-22warn if testing the address of a functionLuc Van Oostenryck1-1/+4
2017-03-04Allow casting to a restricted type if !restricted_valueEdward Cree1-1/+1
2017-02-13validate expression's type in conditionalsLuc Van Oostenryck1-0/+5
2017-02-13fix cast to boolLuc Van Oostenryck1-0/+32
2017-02-13fix typing error in compound assignmentLuc Van Oostenryck1-1/+4
2017-02-13Remove unneeded variable in integer_promotion()Luc Van Oostenryck1-3/+1
2017-02-13cleanup: remove evaluate_arguments()'s unused argumentLuc Van Oostenryck1-2/+2
2017-01-27Fix type checking of variadic functionsLuc Van Oostenryck1-1/+1
2015-03-13Ignore pure attribute in assignementArd Biesheuvel1-1/+1
2014-10-25teach next_designators() use array_element_offset()Christopher Li1-1/+1
2014-10-10sparse: treat function pointers as pointers to const dataArd Biesheuvel1-0/+9
2014-09-18Fix initializers in anonymous structs and unionsLinus Torvalds1-2/+18
2014-07-17round up the array element size to byte alignChristopher Li1-1/+1
2014-04-03Fix error at anoymous unionsLinus Torvalds1-12/+2
2014-04-01Add warning about duplicate initializersLinus Torvalds1-0/+8
2014-04-01Support GCC's transparent unionsJohn Keeping1-1/+27
2014-04-01evaluate: split out implementation of compatible_assignment_typesJohn Keeping1-23/+34
2014-02-27sparse: Allow override of sizeof(bool) warningJoe Perches1-1/+2
2013-11-29sparse: Also check bit_offset when checking implicit castsFranz Schrober1-1/+2
2013-11-29sparse: Relicense under the MIT licenseFranz Schrober1-1/+17
2013-11-29Revert "Fix mistaken comparison that becomes a no-op."Franz Schrober1-1/+1
2013-05-27Fix expression type for floating point negation ('!')Xi Wang1-1/+1
2013-05-27Fix result type of relational and logical operatorsXi Wang1-6/+9
2013-04-26Allow forced attribute in function argumentv0.4.5-rc1Christopher Li1-1/+1
2013-04-19Warn about initialization of a char array with a too long constant C string.Masatake YAMATO1-4/+8
2013-02-13Merge git://git.kernel.org/pub/scm/linux/kernel/git/viro/sparse into margeChristopher Li1-9/+17
2013-02-12Gentler handling of bitwise warnings in unary operationsAl Viro1-9/+17
2012-06-04check missing or duplicate goto labelsXi Wang1-1/+11
2011-08-23Fix parsing empty asm clobberChristopher Li1-1/+1
2011-05-31Remove set but not used variableChristopher Li1-8/+2
2011-05-07evaluate: Allow sizeof(_Bool) to succeed.Ben Pfaff1-0/+5
2010-06-17parser: add support for asm gotoJiri Slaby1-0/+8
2010-03-29evaluate: check for NULL type inside typeofChristopher1-1/+3
2010-03-28New attribute designated_init: mark a struct as requiring designated initJosh Triplett1-0/+10
2009-08-01Add support for TImode type (__int128_t)Blue Swirl1-3/+3
2009-07-19move extern inline function to file scopeChristopher Li1-5/+0
2009-07-18Add missing checks for Waddress-spaceMartin Nagy1-4/+4
2009-07-17Fix implicit cast to floatThomas Schmid1-31/+0