aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/lib.c
AgeCommit message (Expand)AuthorFilesLines
2021-01-27Makefile: fix version.h dependenciesKyle Russell1-1/+0
2020-07-30fix diagnostic source path from command lineLuc Van Oostenryck1-0/+2
2020-07-22add position to struct streamLuc Van Oostenryck1-1/+1
2020-07-19prepend diagnostics with source's path and include chainLuc Van Oostenryck1-5/+81
2020-07-11teach sparse about -fmax-errorsLuc Van Oostenryck1-1/+1
2020-07-06predef: simplify add_pre_buffer()Luc Van Oostenryck1-6/+3
2020-07-06cleanup: move hexval() to utils.cLuc Van Oostenryck1-17/+0
2020-07-06cleanup: move parsing helpers to parse.cLuc Van Oostenryck1-38/+0
2020-07-02cleanup: move predefines in a separate fileLuc Van Oostenryck1-221/+0
2020-07-02options: move option parsing in a separate fileLuc Van Oostenryck1-980/+2
2020-07-02options: add a small helper: handle_switch_finalize()Luc Van Oostenryck1-2/+7
2020-07-02options: avoid spaces between function name and arguments listLuc Van Oostenryck1-17/+17
2020-07-02options: alphasort the handle_switch_[a-zA_Z]()Luc Van Oostenryck1-301/+299
2020-07-02options: move helpers upLuc Van Oostenryck1-43/+44
2020-07-02options: handle_onoff_switch() can handle any flags, not only warningsLuc Van Oostenryck1-18/+18
2020-07-02options: make Wsparse_error less specialLuc Van Oostenryck1-2/+2
2020-07-02options: move on top the definition of warning type enumsLuc Van Oostenryck1-6/+6
2020-07-02options: move -Wsparse-all's processing out of handle_onoff_switch()Luc Van Oostenryck1-8/+8
2020-07-02options: let handle_onoff_switch() use null terminated arraysLuc Van Oostenryck1-9/+11
2020-06-23teach sparse about __STDC_HOSTED__Luc Van Oostenryck1-0/+4
2020-06-18Merge branch 'genmacro'Luc Van Oostenryck1-2/+0
2020-06-18pre-process: make __has_{attribute,builtin}() true builtin macrosLuc Van Oostenryck1-2/+0
2020-06-12builtin: use a table for the builtinsLuc Van Oostenryck1-1/+0
2020-06-12builtin: can be initialized laterLuc Van Oostenryck1-0/+1
2020-06-03univ-init: set default to -Wno-universal-initializerLuc Van Oostenryck1-1/+1
2020-05-27add an option to suppress warning 'no newline at EOF'Luc Van Oostenryck1-0/+2
2020-05-21univ-init: conditionally accept { 0 } without warningsLuc Van Oostenryck1-0/+2
2020-03-15teach sparse about -pedantic/-WpedanticLuc Van Oostenryck1-0/+14
2020-01-22pre-define __unix__ and friendsJohn Levon1-0/+6
2020-01-22add necessary defined for sunos-derived systemsJohn Levon1-0/+7
2020-01-22define __PRAGMA_REDEFINE_EXTNAMEJohn Levon1-0/+2
2019-12-16arch: arch_mach is not needed anymoreLuc Van Oostenryck1-1/+0
2019-12-16arch: use arch_target for INT128's predefineLuc Van Oostenryck1-9/+1
2019-12-16arch: move cmodel predefines to the target files.Luc Van Oostenryck1-50/+0
2019-12-16arch: move target-specific predefines to the target files.Luc Van Oostenryck1-85/+2
2019-12-16arch: move handle_arch_finalize() into target_init()Luc Van Oostenryck1-34/+1
2019-12-16arch: move parsing of --arch=<ARCH> to target.cLuc Van Oostenryck1-46/+4
2019-12-16arch: move arch-specificities to their own filesLuc Van Oostenryck1-31/+27
2019-12-01teach sparse about C17Luc Van Oostenryck1-0/+13
2019-12-01separate definition of __STDC_NO_ATOMICS__ and friends from C11Luc Van Oostenryck1-3/+5
2019-12-01simplify definition of __STRICT_ANSI__Luc Van Oostenryck1-8/+2
2019-12-01reorganize the __STDC_VERSION__/__STRICT_ANSI__ switch statementLuc Van Oostenryck1-8/+5
2019-11-28allow to test the standard version outside of lib.cLuc Van Oostenryck1-7/+1
2019-11-28simplify initialization of WdeclarationafterstatementLuc Van Oostenryck1-14/+3
2019-11-28arch: add missing predefines for PPCLuc Van Oostenryck1-0/+3
2019-11-28arch: add missing predfines: __amd64 & __amd64__Luc Van Oostenryck1-0/+2
2019-11-28Merge branch 'arch-cleanup' into masterLuc Van Oostenryck1-18/+23
2019-11-28arch: use a variable for the OSLuc Van Oostenryck1-0/+1
2019-11-28arch: add predefines for INT128 only on supported archsLuc Van Oostenryck1-2/+11
2019-11-28arch: char32_t should be the same as uint32_t, not uintLuc Van Oostenryck1-1/+1
2019-11-27Merge branch 'arm-hf' into masterLuc Van Oostenryck1-214/+271
2019-11-27fp-abi: teach sparse about -m{hard,soft}-floatLuc Van Oostenryck1-0/+2
2019-11-27fp-abi: teach sparse about -mfloat-abi on ARMLuc Van Oostenryck1-0/+23
2019-11-15option: simpler handling of key-value for suboptionsLuc Van Oostenryck1-20/+40
2019-11-15option: use handle_switches() for -m flagsLuc Van Oostenryck1-17/+17
2019-11-15option: allow handle_switches() to set non-boolean valuesLuc Van Oostenryck1-0/+4
2019-11-15arch: teach sparse about -fshort-wcharLuc Van Oostenryck1-0/+2
2019-11-15option: move all option parsing helpers before their potential usesLuc Van Oostenryck1-180/+188
2019-11-14arch: remove impossible cases with 64-bit arch not being lp64Luc Van Oostenryck1-14/+9
2019-11-14arch: fix the signedness of plain charsLuc Van Oostenryck1-1/+1
2019-11-12Add -Wexternal-function-has-definitionJohn Levon1-0/+2
2019-11-12lib.c: fix spelling of _BIG_ENDIANRamsay Jones1-1/+1
2019-11-09cgcc: let sparse define _BIG_ENDIANLuc Van Oostenryck1-0/+2
2019-11-06arch: fix setting the endiannessLuc Van Oostenryck1-3/+1
2019-11-05Merge branch 'option-arch'Luc Van Oostenryck1-0/+72
2019-10-30arch: add an option to specify the desired arch: --arch=<arch>Luc Van Oostenryck1-0/+68
2019-10-30arch: add support for s390 (ILP32)Luc Van Oostenryck1-0/+3
2019-10-30arch: add predefine for __mips__Luc Van Oostenryck1-0/+1
2019-10-28options: add support for -mcmodelLuc Van Oostenryck1-0/+86
2019-10-28options: add support for -fpic, -fPIC, -fpie & -fPIELuc Van Oostenryck1-0/+24
2019-10-03cleanup: make arch_msize_long staticLuc Van Oostenryck1-1/+1
2019-02-07predefs: add arch-specific predefinesLuc Van Oostenryck1-7/+60
2019-02-04predefs: fix for MIPS system headers needing _MIPS_SZ{INT,LONG,PTR}Luc Van Oostenryck1-0/+9
2019-02-04lib.c: move handle_arch_m64_finalize() to init_target()Luc Van Oostenryck1-41/+1
2019-02-04lib.c: move predefines out of handle_arch_m64_finalize()Luc Van Oostenryck1-12/+24
2018-12-19Merge branch 'bitwise-ptr'Luc Van Oostenryck1-0/+2
2018-12-17add a flag to warn on casts to/from bitwise pointersLuc Van Oostenryck1-0/+2
2018-12-17Merge branch 'predefs' into tipv0.6.0-rc1Luc Van Oostenryck1-65/+101
2018-12-17add predefine_min() and use it for __{WCHAR,WINT}_MIN__Luc Van Oostenryck1-2/+17
2018-12-17add predefine for __CHAR_UNSIGNED__Luc Van Oostenryck1-1/+3
2018-12-17add predefined macros for char{16,32}_tLuc Van Oostenryck1-0/+2
2018-12-17add predefined macros for [u]int32_tLuc Van Oostenryck1-0/+2
2018-12-17add predefined macros for [u]int64_tLuc Van Oostenryck1-0/+8
2018-12-17add predefined macros for [u]int{8,16}_tLuc Van Oostenryck1-0/+5
2018-12-17add predefined macros for [u]intmaxLuc Van Oostenryck1-0/+6
2018-12-17add predefined macros for [u]intptrLuc Van Oostenryck1-0/+2
2018-12-17add predefined macros for wint_tLuc Van Oostenryck1-0/+1
2018-12-17use the type for predefined_max()Luc Van Oostenryck1-5/+5
2018-12-17give a type to wcharLuc Van Oostenryck1-3/+3
2018-12-17make predefined_type_size() more genericLuc Van Oostenryck1-23/+38
2018-12-14use bits_mask() for predefined_max()Luc Van Oostenryck1-1/+2
2018-12-14allow optional "_T" suffix to __SIZEOF_XXX__Luc Van Oostenryck1-12/+12
2018-12-14fix '__SIZE_TYPE__' for LLP64Luc Van Oostenryck1-10/+7
2018-12-14Consolidate 'machine detection' into "machine.h"Luc Van Oostenryck1-21/+1
2018-12-09Merge branch 'dump-macros'Luc Van Oostenryck1-9/+32
2018-12-01Conditionalize 'warning: non-ANSI function ...'John Levon1-0/+4
2018-12-01Use -Wimplicit-int when warning about missing K&R argument typesLuc Van Oostenryck1-0/+2
2018-11-24pre-process: add the -dM option to dump macro definitionsRamsay Jones1-9/+32
2018-11-24teach sparse about '-x <language>'Luc Van Oostenryck1-0/+8
2018-11-24teach sparse about '-o <file>'Luc Van Oostenryck1-0/+13
2018-11-23constant: add -Wconstant-suffix warningRamsay Jones1-0/+2
2018-09-06Merge branches 'missing-return' and 'fix-logical-phi' into tipLuc Van Oostenryck1-0/+1
2018-09-05add linearization as a passLuc Van Oostenryck1-0/+1
2018-09-01stricter warning for explicit cast to ulongLuc Van Oostenryck1-0/+2
2018-09-01has-attr: add support for __has_attribute()Luc Van Oostenryck1-0/+1
2018-08-25Merge branch 'ssa' into tipLuc Van Oostenryck1-0/+4
2018-07-23big-shift: add -Wshift-count-{negative,overflow}Luc Van Oostenryck1-0/+4
2018-07-01dom: add some debugging for the dominance treeLuc Van Oostenryck1-0/+2
2018-07-01graph: add debugging for (reverse) postorder traversalLuc Van Oostenryck1-0/+2
2018-06-23cast: add support for -Wpointer-to-int-castLuc Van Oostenryck1-0/+2
2018-06-23cast: specialize casts from unsigned to pointersLuc Van Oostenryck1-0/+2
2018-06-21Merge branch 'ptrlist-cleanup' into tipLuc Van Oostenryck1-2/+2
2018-06-21ptrlist: remove ptr_list_empty()Luc Van Oostenryck1-1/+1
2018-06-21Merge branch 'ir-validate' into tipLuc Van Oostenryck1-4/+6
2018-06-21add predefines for __INT_WIDTH__ & friendsLuc Van Oostenryck1-0/+15
2018-06-16ir-validate: add framework for IR validationLuc Van Oostenryck1-0/+2
2018-06-16keep the debug flags alphabetically sortedLuc Van Oostenryck1-4/+4
2018-06-16add support for -fdiagnostic-prefix[=prefix]Luc Van Oostenryck1-3/+19
2018-06-13ptrlist: remove now unneeded add_ptr_list_notag()Luc Van Oostenryck1-1/+1
2018-06-13teach sparse about -m16Luc Van Oostenryck1-1/+1
2018-06-12Merge branches 'has-builtin' and 'builtin-predef' into tipLuc Van Oostenryck1-97/+86
2018-06-12builtin: merge declare_builtin_function() with declare_builtins()Luc Van Oostenryck1-19/+0
2018-06-12builtin: switch calling order of predefined_macros() & friendsLuc Van Oostenryck1-2/+2
2018-06-08builtin: consolidate predefined_macros()Luc Van Oostenryck1-56/+56
2018-06-08builtin: directly predefine builtin macrosLuc Van Oostenryck1-38/+45
2018-06-08builtin: add support for __has_builtin()Luc Van Oostenryck1-0/+1
2018-06-04dyn-macro: add real support for __BASE_FILE__Luc Van Oostenryck1-3/+3
2018-06-01avoid multiple error message after parsing errorLuc Van Oostenryck1-1/+8
2018-05-26add helper for new parsing errors: unexpected()Luc Van Oostenryck1-1/+16
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-05Merge branches 'no-path-max', 'vcompound' and 'build-x32' into tipLuc Van Oostenryck1-6/+23
2018-05-04sparse: option to print compound global data symbol infoRandy Dunlap1-0/+2
2018-05-01use also __x86_64 when __x86_64__ is usedLuc Van Oostenryck1-2/+3
2018-05-01add a flag -mx32 ILP32 env on 64 bit archsLuc Van Oostenryck1-0/+12
2018-05-01use an enum for ARCH_LP32 & friendsLuc Van Oostenryck1-3/+5
2018-04-30fix alignment of 64 bit integers on LLP64Luc Van Oostenryck1-1/+1
2018-04-30default to LP64 for all and only for 64 bit ABIsLuc Van Oostenryck1-1/+1
2018-04-11sparse: add -Wpointer-arith flag to toggle sizeof(void) warningsJoey Pabalinas1-0/+2
2018-02-24rename variable 'optimize' to 'optimize_level'Luc Van Oostenryck1-3/+3
2018-02-17builtin: make builtins more builtinLuc Van Oostenryck1-155/+5
2018-02-17add __builtin functions for isinf_sign, isfinite and isnanLogan Gunthorpe1-0/+3
2018-02-15By default disable the warning flag '-Wunknown-attribute'Luc Van Oostenryck1-1/+1
2018-01-26lib.c: early return from handle_onoff_switch()Randy Dunlap1-0/+1
2018-01-07cleanup: make some functions staticLuc Van Oostenryck1-3/+3
2018-01-07Merge branches 'fmax-warnings', 'funsigned-char', 'testcase-fix-missing-retur...Luc Van Oostenryck1-3/+16
2018-01-03teach sparse about '-fmax-warnings'Luc Van Oostenryck1-3/+11
2017-12-29add support for '-f[no-][un]signed-char'Luc Van Oostenryck1-0/+3
2017-12-29let handle_switches() also handle reverse logicLuc Van Oostenryck1-0/+2
2017-12-16fix: spaces in macro definition on the command lineLuc Van Oostenryck1-1/+1
2017-12-13fix: accept 'sparse -D M...'Luc Van Oostenryck1-4/+8
2017-11-13Merge branch 'dump-ir' into tipLuc Van Oostenryck1-61/+185
2017-11-13dump-ir: make it more flexibleLuc Van Oostenryck1-8/+62
2017-11-13dump-ir: rename -fdump-linearize to -fdump-irLuc Van Oostenryck1-4/+4
2017-11-12dump-ir: allow to specify the passes to execute via cli's optionsLuc Van Oostenryck1-0/+34
2017-11-11Merge branches 'volatile-loads-are-side-effects', 'fix-volatile-simplificatio...Luc Van Oostenryck1-0/+1
2017-11-11flush stdout when warningLuc Van Oostenryck1-0/+1
2017-09-18fix: missing evaluate with '-include'Luc Van Oostenryck1-0/+14
2017-09-14option: handle switches by tableLuc Van Oostenryck1-43/+48
2017-09-14option: constify match_option()Luc Van Oostenryck1-7/+7
2017-09-14option: use OPTION_NUMERIC() for handle_switch_fmemcpy_max_count()Luc Van Oostenryck1-17/+5
2017-09-14option: add support for '-<some-option>=unlimited'Luc Van Oostenryck1-0/+4
2017-09-14option: add support for options with 'zero is infinity'Luc Van Oostenryck1-1/+6
2017-09-14option: extract OPTION_NUMERIC() from handle_switch_fmemcpy_max_count()Luc Van Oostenryck1-0/+19
2017-09-14option: let handle_simple_switch() handle an array of flagsLuc Van Oostenryck1-9/+18
2017-09-14option: rename 'struct warning' to 'struct flag'Luc Van Oostenryck1-5/+5
2017-09-14option: add helper to parse/match command line optionsLuc Van Oostenryck1-14/+20
2017-08-28Merge remote-tracking branch 'luc/constexpr-v4' into masterChristopher Li1-0/+2
2017-08-09lib: workaround the 'redeclared with different type' errorsRamsay Jones1-0/+2
2017-08-09Adding _Pragma()Christopher Li1-0/+1
2017-06-21teach sparse about __BYTE_ORDER__ & __ORDER_{BIG,LITTLE}_ENDIAN__Luc Van Oostenryck1-0/+6
2017-06-21teach sparse about __{BIG,LITTLE}_ENDIAN__Luc Van Oostenryck1-0/+3
2017-06-21teach sparse about -m{big,little}-endianLuc Van Oostenryck1-1/+14
2017-06-15add support for -fmemcpy-max-countLuc Van Oostenryck1-0/+18
2017-06-15add support for -Wmemcpy-max-countLuc Van Oostenryck1-0/+2
2017-06-15keep the warnings table alphabetically sortedLuc Van Oostenryck1-1/+1
2017-06-14Merge branches 'quiets-bool-cast-restricted-v3', 'error-vs-warnings-v2', 'imp...Luc Van Oostenryck1-17/+125
2017-06-13Add more declarations for more builtin functionsLuc Van Oostenryck1-0/+44
2017-06-10finer control over error vs. warningsLuc Van Oostenryck1-2/+5
2017-05-19Merge branches 'dump-macros-v2', 'fix-predefined-size', 'fix-bool-context', '...v0.5.1-rc1Luc Van Oostenryck1-15/+76
2017-05-19let -dD report macro definitionsLuc Van Oostenryck1-0/+5
2017-05-19teach sparse how to handle -dD flagLuc Van Oostenryck1-0/+16
2017-05-19fix definition of __SCHAR_MAX__ & friendsLuc Van Oostenryck1-7/+10
2017-05-19avoid to redefine __INT_MAX__ and friendsLuc Van Oostenryck1-4/+0
2017-05-19add support for a new flag: -fdump-linearize[=only]Luc Van Oostenryck1-0/+22
2017-05-15teach sparse how to handle '-fmem-report'Luc Van Oostenryck1-4/+4
2017-05-15add helper handle_simple_switch()Luc Van Oostenryck1-0/+19
2017-04-30Merge branches 'sent/float-expand-v2', 'sent/fix-kill-ttsb-v2', 'sent/fix-con...Luc Van Oostenryck1-0/+2
2017-03-31constexpr: check static storage duration objects' intializers' constnessNicolai Stange1-0/+2
2017-03-27predefine __SIZEOF_INT__ & friendsLuc Van Oostenryck1-0/+10
2017-03-27predefine __INT_MAX__ and friendsLuc Van Oostenryck1-5/+18
2017-03-22teach sparse about -WaddressLuc Van Oostenryck1-0/+2
2017-03-06add an optional validation method to external_declaration()Luc Van Oostenryck1-1/+1
2017-03-04ignore whole-range overlapping initializerLuc Van Oostenryck1-0/+1
2017-03-04allow to warn on all overlapping initializersLuc Van Oostenryck1-0/+2
2017-03-04use option: '-Woverride-init'Luc Van Oostenryck1-0/+2
2017-03-04make -Wbitwise operational againLuc Van Oostenryck1-1/+1
2017-02-13expand __builtin_bswap*() with constant argsLuc Van Oostenryck1-32/+3
2017-02-13add support for LLP64 archLuc Van Oostenryck1-7/+27
2017-02-13add warning option '-Wtautological-compare'Luc Van Oostenryck1-0/+2