summaryrefslogtreecommitdiffstatshomepage
path: root/evaluate.c
AgeCommit message (Expand)AuthorFilesLines
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
2009-07-17fun with declarations and definitionsAl Viro1-0/+7
2008-12-28Also warn about sizeof(function)Alexey Zaytsev1-0/+6
2008-12-28Warn about explicit usage of sizeof(void)Christopher Li1-1/+14
2008-12-25Teach classify_type to handle typeofChristopher Li1-0/+5
2008-12-18Expand "dubious !x & y" handling to other combinations of !, &, and |.Josh Triplett1-3/+10
2008-12-17Unhardcode byte size being 8 bits.David Given1-13/+13
2008-12-15Evaluate iterator symbolsChristopher Li1-0/+1
2008-04-05Fix type mismatches with incomplete typesGeoff Johnstone1-0/+4
2008-04-03catch !x & y brainosAl Viro1-0/+3
2008-04-03fix show_typename()Al Viro1-2/+2
2008-04-03saner warnings for restricted typesAl Viro1-13/+20
2007-08-31Rename Wcast_to_address_space to Wcast_to_as to match the command-line argumentJosh Triplett1-1/+1
2007-07-29[PATCH] saner -WtypesignAl Viro1-22/+25
2007-07-29[PATCH] sanitize evaluate_postop()Al Viro1-19/+19
2007-07-29[PATCH] fix evaluate_compare()Al Viro1-2/+2
2007-07-29[PATCH] sanitize evaluate_ptr_add(), start checking for pointers to functionsAl Viro1-16/+25
2007-07-29[PATCH] ...,array should degenerateAl Viro1-1/+3
2007-07-28[PATCH] handling of typeof in evaluate_member_dereference()Al Viro1-1/+1
2007-07-28[PATCH] new helper: unfoul()Al Viro1-8/+14
2007-07-28[PATCH] no such thing as array of functionsAl Viro1-6/+12
2007-07-14[PATCH] deal correctly with qualifiers on arraysAl Viro1-34/+37
2007-07-14[PATCH] rewrite type_difference()Al Viro1-120/+152
2007-07-14[PATCH] fix the sanity check in evaluate_ptr_sub()Al Viro1-6/+7
2007-07-14[PATCH] get compatible_assignment_types() deal with all casesAl Viro1-14/+43
2007-07-14[PATCH] start cleaning type_difference()Al Viro1-25/+9
2007-07-14[PATCH] integer_promotions() can't get SYM_NODE or SYM_ENUMAl Viro1-7/+2
2007-07-14[PATCH] clean up evaluate_sign()Al Viro1-6/+8
2007-07-10fix handling of pointers in ?:Al Viro1-33/+49
2007-07-10fix handling of address_space in casts and assignmentsAl Viro1-54/+37
2007-07-08first pass at null pointer constantsAl Viro1-71/+145
2007-07-08fix the comma handling in integer constant expressionsAl Viro1-0/+6
2007-06-26[PATCH] fix handling of integer constant expressionsAl Viro1-0/+43
2007-06-26[PATCH] implement __builtin_offsetof()Al Viro1-0/+84
2007-06-25[PATCH] warn on return <void expression>;Al Viro1-0/+2
2007-06-25[PATCH] in case of compound literal we want to delay examining typeAl Viro1-5/+6
2007-06-25[PATCH] move degenerate() down into compatible_assignment_types()Al Viro1-17/+13
2007-06-25[PATCH] fix default argument promotionAl Viro1-5/+14
2007-06-25[PATCH] fix index conversions in evaluate_ptr_add()Al Viro1-42/+50
2007-06-25[PATCH] clean up usual_conversions(), kill evaluate_shift()Al Viro1-44/+34
2007-06-25[PATCH] clean up the typechecking in arithmeticsAl Viro1-98/+73
2007-06-25[PATCH] cleanup of evaluate_assign_op()Al Viro1-14/+16