aboutsummaryrefslogtreecommitdiffstats
path: root/cparser/Elab.ml
Commit message (Collapse)AuthorAgeFilesLines
* Allow multiple nameless bit field fields.Bernhard Schommer2016-12-291-2/+4
|
* Avoid exception catch-allXavier Leroy2016-12-261-1/+1
| | | | "try ...; true with _ -> false" is dangerous if "..." raises unexpected exceptions such as Out_of_memory or Stack_overflow.
* Cosmetic indentation changeXavier Leroy2016-12-261-5/+4
|
* Added code for initializers. Bug 20003Bernhard Schommer2016-12-121-1/+19
|
* Moved naming and changed names of aux functionsBernhard Schommer2016-12-121-16/+20
| | | | | | | | The naming of anonymous structs is performed by an additional step in elab_struct_or_union_info instead of in elab_field_group. Also the aux functions are renamed to access. Bug 20003
* Next try for support of anonymous structs.Bernhard Schommer2016-12-071-25/+54
| | | | | | Instead of using idents the anonymous fileds get names of the for <anon>_c where c is a counter of all anonymous members. Bug 20003
* Warning for C11 _Noreturn feature.Bernhard Schommer2016-11-221-4/+10
| | | | The warning for C11 features is now also triggered for _Noreturn.
* Warning for decls without name in composites.Bernhard Schommer2016-11-221-1/+3
| | | | | | The warning missing declarations is now also triggered for declarations without name in field lists of composite types if the declaration is not an anonymous composite or a bitfield member.
* Keep anonymous members of anonymous structs.Bernhard Schommer2016-09-271-2/+4
| | | | | The anonymous members are kept but using them is still an error. Bug 19907
* Improved error messages for wrong vararg calls.Bernhard Schommer2016-09-231-2/+3
| | | | | | Now "expected at least %d" instead of "expected %d". Also improved error message for __builtin_debug. Bug 19872
* Renamed pedantic to implicit-int.Bernhard Schommer2016-09-221-1/+1
| | | | | | | | The only case where compcert raise a pedantic warning was for implicit int parameters. This is the behavior of clang. However since not all other pedantic warnings are supported the behavior of gcc is adopted. Bug 19872.
* Reverted noisy change.Bernhard Schommer2016-09-221-1/+1
| | | | | | In order to empty declarations it is necessary to distinguish between forward declarations and empty declarations. Bug 19859
* Also warn for empty default declarations. Bug 18004Bernhard Schommer2016-09-211-1/+1
|
* Make unnamed default + correct empty struct warning. Bug 18004Bernhard Schommer2016-09-211-2/+2
|
* Allow empty alignment attribute. Bug 18004Bernhard Schommer2016-09-211-0/+1
|
* Fixed typos and reverted error message. Bug 18004Bernhard Schommer2016-09-051-9/+9
|
* Readded parameter number. Bug 18004Bernhard Schommer2016-09-011-6/+6
|
* Reworded warning. Bug 18004Bernhard Schommer2016-09-011-6/+6
|
* Simplified int to pointer tests.Bernhard Schommer2016-09-011-15/+15
| | | | | | Now the same warning is triggered for both cases, int to ptr and ptr to int. Bug 18004
* Fixed error message for & operator. Bug 18004Bernhard Schommer2016-08-311-1/+1
|
* Added conformance warning.Bernhard Schommer2016-08-311-0/+1
| | | | | | This warning should be triggered if a feature is used that is not part of the code CompCert C language. Bug 18004
* Added back logical operator in error. Bug 18004Bernhard Schommer2016-08-311-1/+1
|
* Reworded errors/warnings in Elab.Bernhard Schommer2016-08-311-60/+76
| | | | | | | | Some old errors/warnings messages were better before and are now rephrased. Furthermore some formulations are rephrased to match the used formulations of the ISO C stanard, e.g. storage class is replaced with storage-class. Bug 18004
* bug 18004, fix some typos/grammarMichael Schmidt2016-08-301-4/+4
|
* Fixed types in Elab.ml. Bug 18004Bernhard Schommer2016-08-291-5/+5
|
* Merge branch 'master' into advanced-diagnosticsBernhard Schommer2016-08-291-8/+18
|\
| * Pass the environment of k&r param elaboration.Bernhard Schommer2016-08-291-8/+10
| | | | | | | | | | | | The environment where the types are inserted is passed back to allow introducing structs in k&r parameters. Bug 19668
| * Fixed spelling mistake and unnamed fields.Bernhard Schommer2016-08-291-3/+6
| | | | | | | | | | | | The previous fix for duplicated members was also triggered for unnamed members. Bug 19665
| * Added check for duplicated members. Bug 19665Bernhard Schommer2016-08-291-0/+5
| |
* | Merge branch 'master' into advanced-diagnosticsBernhard Schommer2016-08-291-77/+102
|\|
| * Reuse types from parameters in function definitonsBernhard Schommer2016-08-251-41/+42
| | | | | | | | | | | | In order to allow introducing structs in parameter definitions the environment must keep the type information. Bug 19602
| * Test if struct is redefined as union or otherwise.Bernhard Schommer2016-08-251-0/+2
| | | | | | | | | | | | If a declaration of a composite is encountered it is also tested if the kind is equal. Bug 19630.
| * Fix for initialization of incomplete typesBernhard Schommer2016-08-231-3/+3
| | | | | | | | | | | | Since some incomplete types are allowed in initialization just test whether the default initilization exists. Bug 19601
| * Added types found in cast to Environment.Bernhard Schommer2016-08-231-2/+2
| | | | | | | | | | | | New types introduced in casts are now inserted into the right Environment and carried along. Bug 19614.
| * Revert "Reuse env from during parameter elaboration."Bernhard Schommer2016-08-231-4/+4
| | | | | | | | This reverts commit c64c4ab2526ad87a3506c9e1fdf31fa1446c16eb.
| * Reuse env from during parameter elaboration.Bernhard Schommer2016-08-221-4/+4
| | | | | | | | | | Allows adding struct definitions in function parameters. Bug 19602.
| * Better error message for function initializerBernhard Schommer2016-08-221-0/+4
| | | | | | | | | | | | Initializers for function variables are not allowed. CompCert now reports an error and exits. Bug 19606
| * Test for incomplete type during initialization.Bernhard Schommer2016-08-221-1/+6
| | | | | | | | | | | | Before the initializazion is computed we check wether the type is incomplete. Bug 19601
| * Error for va_start in non-vararg function.Bernhard Schommer2016-08-221-27/+31
| | | | | | | | | | | | CompCert now reports an error for usage of the va_start macro in non variadic functions. Bug 19600.
| * Added check for incomplete parameter types.Bernhard Schommer2016-08-201-1/+5
| | | | | | | | | | Parameters also need to be checked for incomplete types. Bug 19596
| * Exit earlier on invalid alignof and sizeof.Bernhard Schommer2016-08-191-4/+4
| | | | | | | | | | | | Alginof and sizeof applied to incomplete types now exit earlier with a fatal error. Bug 19594.
| * Disallow void as type for variables.Bernhard Schommer2016-08-181-0/+2
| | | | | | | | | | | | This allows problems in elaboration of the initializers for variables of void type. Bug 19577.
| * Exit earlier on empty union.Bernhard Schommer2016-08-171-1/+5
| | | | | | | | | | | | | | Instead of a warning for an empty union CompCert reports an error and exits. This avoids problems during the generation of initializers for these. Bug 19565.
| * Catch attribute excpetion in _Alignas elabBernhard Schommer2016-08-171-0/+1
| | | | | | | | | | | | The exception Wrong_attr_arg raised is now catched during the translation of the wrong _Alignas attributes. Bug 19568.
| * Added error check before transformations.Bernhard Schommer2016-08-081-1/+1
| | | | | | | | | | | | Added a check for errors after the elab phases to avoid problems in the transformations due to broken input programs. Bug 19504
| * Exit earlier on wrong return types.Bernhard Schommer2016-08-071-1/+1
| | | | | | | | | | | | Return with a expression that is not compatible with the given return type of a function now causes and fatal error, to avoid problems with later transformation passes depending on it.
* | Added raw printing of types without formatting.Bernhard Schommer2016-08-161-2/+2
| | | | | | | | | | | | This avoids introducing line breaks during printing of function types. Bug 18004
* | Classified all warnings and added various options.Bernhard Schommer2016-07-291-253/+320
|/ | | | | | | | | | Now each warning either has a name and can be turned on/off, made into an error,etc. or is a warning that always will be triggered. The message of the warnings are similar to the ones emited by gcc/clang and all fit into one line. Furthermore the diagnostics are now colored if colored output is available. Bug 18004
* Nicer error message for redefinitions with incompatible typeXavier Leroy2016-07-221-3/+4
|
* Improved handling of C90 calls to undeclared functionsXavier Leroy2016-07-211-73/+75
| | | | | | In a call such as "f(expr, ..., expr)", if the identifier "f" is not declared, declare it as specified in the ISO C90 standard, namely like "extern int f()" would do it. Previously, the declaration was done "on the side" and not properly recorded in the environments. The diff is relatively large because the "enter_or_refine_ident" had to be moved up in the file.