aboutsummaryrefslogtreecommitdiffstats
path: root/cparser/Diagnostics.ml
Commit message (Collapse)AuthorAgeFilesLines
* [BROKEN] Merge with v3.9 : something broken for __builtin_expect in ↵Cyril SIX2021-06-011-4/+5
| | | | cfrontend/C2C.ml
* Introduce additional "branch" build information.Bernhard Schommer2020-07-081-5/+5
|
* Added back unused_ais_parameter warning.Bernhard Schommer2019-11-261-0/+1
|
* Simplified diagnostics module.Bernhard Schommer2019-11-251-118/+41
| | | | | | | Instead of constructing four different lists for maintaining the state of the warnings only one list is now used. This list contains the name of the warning and a boolean indicating whether this option should be active by default. The rest is computed from this list.
* Added new diagnostic for non-linear conditionalsBernhard Schommer2019-07-041-0/+8
| | | | | | | | | | | | | | The new diagnostics is triggered if a conditional is used that may not be transformed into linear code by the later by the if conversion. The new diagnostic is emitted if a conditional may contain an unsafe expression or is contained within another conditional, logical and or logical or expression. An expression is unsafe if it contains a call, changes memory or if its evaluation leads to undefined behavior, for example division and modulo. Also fixes a small typo in a comment in Cutil.
* Fix misspellings in messages, man pages, and commentsXavier Leroy2019-05-311-1/+1
| | | | | | This is a manual, partial merge of Github pull request #296 by @Fourchaux. flocq/, cparser/MenhirLib/ and parts of test/ have not been changed because these are local copies and the fixes should be performed upstream.
* Change to AbsInt version string.Bernhard Schommer2019-05-101-1/+1
| | | | | The AbsInt build number no longer contains "release", so it must be printed additionally.
* Ensure flushing of the error formatter.Bernhard Schommer2019-05-101-0/+4
| | | | | Since the error formatter is not automatically flushed at program exit we need to ensure that it is flushed at exit.
* New diagnostic for reduced alignment (#117)Bernhard Schommer2018-08-291-0/+5
| | | | | | | The new diagnostic triggers if an `_Alignas` or an `aligned` attribute or a `packed` attribute requests an alignment smaller than the natural alignment. Bug 23389
* Added warning for incomplete tentative static defs (#114)Bernhard Schommer2018-08-201-0/+5
| | | | | | Tentative static definitions with incomplete type are not allowed in C99. However most popular compilers support them and warn about them. Bug 23377
* Additional checks for flex arrays in structs (#93)Bernhard Schommer2018-08-201-0/+5
| | | | | | | | | | | | | | | * Error for structs with only flex array member Flexible array members are only allowed if another member exists. Bug 23324 * Added checks for nesting of structs with flex array members Warn if a struct with a flex array member is used as array element or member of another struct. Such usage is dubious. Bug 23324 Don't warn if the struct-with-flex-array is a member of an union.
* Warn for defs and uses of static variables in nonstatic inline functionsXavier Leroy2018-06-041-0/+6
| | | | | | | Nonstatic inline functions can be expanded in several compilation units. The static variables in question may differ between different expansions. This is a manual merge and adaptation of pull request #P95 by @bschommer.
* Turn off the warning "C11 extension" by defaultXavier Leroy2018-06-041-1/+0
| | | | | | These are extensions w.r.t. C99, not incompatible changes. Nothing bad can happen if those C11 features are used, except making the code incompatible with C99.
* Warning for extern declaration after definition.Bernhard Schommer2018-05-261-0/+6
| | | | | | | | | Warning for change of storage class after the definition of a function from default storage class to extern storage class. This only plays a role if the function is also declared inline, since for inline functions with default storage class no code is generated, but for inline functions with extern storage class code should be generated. Bug 23512
* Added a diagnostic for attributes dec after defBernhard Schommer2018-05-071-0/+6
| | | | | | The new warning is raise for function declaration after a function definition that introduce new attributes, which are ignored. Bug 23385
* Improve error messages.Bernhard Schommer2018-03-071-0/+5
| | | | | | | | Include the format specifier in error message when available in order to make it easier to spot the broken ais parameter. Futhermore introduce a new warning for unused ais parameters. Bug 22464
* Reactivated and improved ais annotations.Bernhard Schommer2018-03-061-1/+7
| | | | | | | | | | | | | | | | | | The ais annotations are now handled in a separate file shared between all architectures. Also two different variants of replacements are supported, %e which expands to ais expressions and %l which also expands to an ais expression but is guaranted to be usable as l-value in the ais annotation. Otherwise the new warning is Wrong_is_parameter is generated. Also an error message is generated if floating point variables are used in ais annotations since a3 does not support them at the moment. Additionally an error message is generated for plain volatile variables used, since they will enforce a volatile load and result in the value being passed to the annotation instead of the address as other global variables.
* Added error summary in case of fatal error.Bernhard Schommer2018-02-091-0/+10
|
* Refactor the handling of errors and warnings (#44)Bernhard Schommer2018-02-081-0/+437
* Module Cerrors is now called Diagnostic and can be used in parts of CompCert other than cparser/ * Replaced eprintf error. Instead of having eprintf msg; exit 2 use the functions from the Diagnostics module. * Raise on error before calling external tools. * Added diagnostics to clightgen. * Fix error handling of AsmToJson. * Cleanup error handling of Elab and C2C. *The implementation of location printing (file & line) is simplified and correctly prints valid filenames with invalid lines.