diff --git a/doc/userman/user-changes.tex b/doc/userman/user-changes.tex index a278ae6c20a0d2076a417cbbb8ff0e1e4e190e92..2c9097889fe6b3eab1e7409d805cf593136f4890 100644 --- a/doc/userman/user-changes.tex +++ b/doc/userman/user-changes.tex @@ -3,10 +3,11 @@ This chapter summarizes the changes in this documentation between each \FramaC release. First we list changes of the last release. -%\section*{Frama-C+dev} -%\begin{itemize} -%\item … -%\end{itemize} +\section*{Frama-C+dev} +\begin{itemize} +\item \textbf{Normalizing the Source Code:} deprecated option \texttt{-c11} + (enabled by default). +\end{itemize} \section*{26.0 (Iron)} \begin{itemize} diff --git a/doc/userman/user-sources.tex b/doc/userman/user-sources.tex index 42e1bb39238d7286e8be314a05ccea46d90dd647..09b331badf4c5ffc70bad9d102f24fc0263169cd 100644 --- a/doc/userman/user-sources.tex +++ b/doc/userman/user-sources.tex @@ -327,9 +327,6 @@ To ignore this disabling \pragmadef{UNROLL} pragma and force unrolling, the opti Passing a negative argument to \texttt{-ulevel} will disable unrolling, even in case of \texttt{UNROLL} pragma. - -\item \optiondef{-}{c11} allows the use of some C11 constructs. Currently -supported are typedefs redefinition. \end{description} \section{Incremental parsing} (experimental)\label{sec:incremental-parsing} @@ -411,8 +408,11 @@ standard library. They are described below. \section{Compiler and language extensions}\label{sec:extensions} \FramaC's default behavior is to be fairly strict concerning language features. -By default, most non-C99 compiler extensions are not accepted, similarly to -when compiling a program with \verb+gcc -std=c99 -pedantic -pedantic-errors+. +By default, most C99 and C11 features are accepted\footnote{For more details +about C99/C11 feature support, see +Section~\ref{sec:unsupported-iso-c-features}.}, but most non-ISO C compiler +extensions are not accepted, similarly to when compiling a program with +\verb+gcc -std=c11 -pedantic -pedantic-errors+. However, depending on the machine architecture (see option \optiondef{-}{machdep}, in Section~\ref{sec:normalize}), @@ -421,24 +421,13 @@ For instance, trying to parse a program containing an empty initializer, such as \verb+int c[10] = {};+ will result in the following error message: \begin{verbatim} -[kernel] user error: empty initializers only allowed for GCC/MSVC +[kernel] user error: empty initializers only allowed for GCC/MSVC; see option + -machdep or run 'frama-c -machdep help' for the list of available machdeps \end{verbatim} This means that using a GCC or MSVC machdep (e.g., \verb+-machdep gcc_x86_32+) will allow the language extension to be accepted by \FramaC. -Alternatively, some C11 extensions are supported via option \verb+-c11+. -For instance, the following program is invalid in C99 but valid in C11 -(typedef redefinition): \lstinline|typedef int a; typedef int a;| - -The error message given by \FramaC when trying to parse this program will -indicate the option needed to allow the file to be parsed: - -\begin{verbatim} -[kernel] user error: redefinition of type 'a' in the same scope is only - allowed in C11 (option -c11). -\end{verbatim} - \section{Standard library (libc)}\label{sec:libc} \FramaC bundles a C standard library in order to help parse and analyze code diff --git a/man/frama-c.1 b/man/frama-c.1 index cd42b77afbd29c9d9d88df5c64f94e166dcbf1c6..c960811ac632c5d687cd1e99f48651132a74b183 100644 --- a/man/frama-c.1 +++ b/man/frama-c.1 @@ -1,6 +1,6 @@ .\" Automatically generated by Pandoc 2.14.0.3 .\" -.TH "FRAMA-C" "1" "" "2023-02-01" "" +.TH "FRAMA-C" "1" "" "2023-02-13" "" .hy .\"------------------------------------------------------------------------ .\" @@ -157,10 +157,6 @@ Defaults to yes. automatically marks contracts generated from asm as valid. Defaults to no. .TP --c11 -enables (partial) C11 compatibility, e.g.\ typedef redefinitions. -Defaults to no. -.TP [-no]-collapse-call-cast allows implicit cast between the value returned by a function and the lvalue it is assigned to. diff --git a/man/frama-c.1.md b/man/frama-c.1.md index d56f5de6055ba44ab42df691a2c5c8f86e9309a4..5b61fc0b5ecc2413ec8f9a48e0af56fabf1ce0b4 100644 --- a/man/frama-c.1.md +++ b/man/frama-c.1.md @@ -1,5 +1,5 @@ --- -title: 'FRAMA-C(1) 2023-02-01' +title: 'FRAMA-C(1) 2023-02-13' header-includes: - | ```{=man} @@ -142,10 +142,6 @@ syntax. Defaults to yes. [-no]-asm-contracts-auto-validate : automatically marks contracts generated from asm as valid. Defaults to no. --c11 -: enables (partial) C11 compatibility, e.g. typedef redefinitions. -Defaults to no. - [-no]-collapse-call-cast : allows implicit cast between the value returned by a function and the lvalue it is assigned to. Otherwise, a temporary variable is used and the cast is made diff --git a/share/analysis-scripts/estimate_difficulty.py b/share/analysis-scripts/estimate_difficulty.py index 8de5a907324a20eff0a543fdce514129ab4f5d60..7e5af576871f38379a95dc129f8e00bf4bf862bf 100755 --- a/share/analysis-scripts/estimate_difficulty.py +++ b/share/analysis-scripts/estimate_difficulty.py @@ -315,7 +315,6 @@ c11_unsupported = [ "_Alignas", "_Alignof", "_Complex", - "_Generic", "_Imaginary", "alignas", "alignof", # stdalign.h may use these symbols diff --git a/share/libc/stdnoreturn.h b/share/libc/stdnoreturn.h index f872fd0dc612e9b518ae7eddb8fcc28d39293980..1672207f62aabf06f8972d29c52c54647b5cb803 100644 --- a/share/libc/stdnoreturn.h +++ b/share/libc/stdnoreturn.h @@ -24,8 +24,5 @@ // 'noreturn' is an attribute in C++ #ifndef __cpluscplus -// Note that Frama-C still requires the '-c11' command-line option to parse -// the _Noreturn keyword. Mere inclusion of this header without the option -// will not work. #define noreturn _Noreturn #endif diff --git a/src/kernel_internals/parsing/clexer.mll b/src/kernel_internals/parsing/clexer.mll index 6f7884616e4bdf1d0c193bb4eb26e1d724b11c99..7f3c63f33ae2ac846128b338aac19e179edd2c3e 100644 --- a/src/kernel_internals/parsing/clexer.mll +++ b/src/kernel_internals/parsing/clexer.mll @@ -153,24 +153,12 @@ let init_lexicon _ = end); ("_Noreturn", fun loc -> - if Kernel.C11.get () then NORETURN loc - else begin - Kernel.( - warning - ~wkey:wkey_conditional_feature - "_Noreturn is a C11 keyword, use -c11 option to enable it"); - IDENT "_Noreturn" - end); + Kernel.(warning ~wkey:wkey_c11 "_Noreturn is a C11 keyword"); + NORETURN loc); ("_Static_assert", fun loc -> - if Kernel.C11.get () then STATIC_ASSERT loc - else begin - Kernel.( - warning - ~wkey:wkey_conditional_feature - "_Static_assert is a C11 keyword, use -c11 option to enable it"); - IDENT "_Static_assert" - end); + Kernel.(warning ~wkey:wkey_c11 "_Static_assert is a C11 keyword"); + STATIC_ASSERT loc); ("__attribute__", fun loc -> ATTRIBUTE loc); ("__attribute", fun loc -> ATTRIBUTE loc); ("__blockattribute__", fun _ -> BLOCKATTRIBUTE); @@ -218,14 +206,8 @@ let init_lexicon _ = ("__builtin_offsetof", fun loc -> BUILTIN_OFFSETOF loc); ("_Thread_local", fun loc -> - if Kernel.C11.get () then THREAD_LOCAL loc - else begin - Kernel.( - warning - ~wkey:wkey_conditional_feature - "_Thread_local is a C11 keyword, use -c11 option to enable it"); - IDENT "_Thread_local" - end); + Kernel.(warning ~wkey:wkey_c11 "_Thread_local is a C11 keyword"); + THREAD_LOCAL loc); (* We recognize __thread for GCC machdeps *) ("__thread", fun loc -> @@ -266,14 +248,8 @@ let init_lexicon _ = "_Complex is currently unsupported by Frama-C."); ("_Generic", fun loc -> - if Kernel.C11.get () then GENERIC loc - else begin - Kernel.( - warning - ~wkey:wkey_conditional_feature - "_Generic is a C11 keyword, use -c11 option to enable it"); - IDENT "_Generic" - end); + Kernel.(warning ~wkey:wkey_c11 "_Generic is a C11 keyword"); + GENERIC loc); ("_Imaginary", fun loc -> Kernel.fatal ~source:(fst loc) diff --git a/src/kernel_internals/typing/cabs2cil.ml b/src/kernel_internals/typing/cabs2cil.ml index f483a6695bbc582f8bf4d4fa5f2b1a74d0d009e4..a39379b17639f2b7b16fa30bc44001c212afbb3e 100644 --- a/src/kernel_internals/typing/cabs2cil.ml +++ b/src/kernel_internals/typing/cabs2cil.ml @@ -1074,7 +1074,7 @@ let newAlphaName end else raise Not_found in - if not (Kernel.C11.get () && kind = "type") then + if kind <> "type" then (* in C11, typedefs can be redefined under some conditions (which are checked in doTypedef); this test catches other kinds of errors, such as redefined enumeration constants *) @@ -5594,11 +5594,8 @@ and makeCompType ghost (isstruct: bool) if n = missingFieldName then begin match unrollType ftype with | TComp _ -> begin - if not (Kernel.C11.get ()) then - Kernel.warning ~once:true ~current:true - "unnamed fields are a C11 extension \ - (use %s to avoid this warning)" - Kernel.C11.name; + Kernel.warning ~wkey:Kernel.wkey_c11 ~once:true ~current:true + "unnamed fields are a C11 extension"; incr anonCompFieldNameId; anonCompFieldName ^ (string_of_int !anonCompFieldNameId) end @@ -9885,10 +9882,10 @@ and doTypedef ghost ((specs, nl): Cabs.name_group) = Previous declaration was at %a" n Cil_datatype.Location.pretty oldloc in - let error_c11_redefinition () = - Kernel.error ~current:true - "redefinition of type '%s' in the same scope is only allowed in C11 \ - (option %s).@ Previous declaration was at %a" n Kernel.C11.name + let warn_c11_redefinition () = + Kernel.warning ~wkey:Kernel.wkey_c11 ~current:true + "redefinition of type '%s' in the same scope is only allowed \ + in C11.@ Previous declaration was at %a" n Cil_datatype.Location.pretty oldloc in (* Tested with GCC+Clang: redefinition of compatible types in same scope: @@ -9915,7 +9912,7 @@ and doTypedef ghost ((specs, nl): Cabs.name_group) = error_conflicting_types () else (* redeclaration in same scope valid only in C11 *) - if not (Kernel.C11.get ()) then error_c11_redefinition () + warn_c11_redefinition () | _ -> (* because of the compatibility test, this should not happen *) Kernel.fatal ~current:true "typeinfo.ttype (%a) should be TComp" Cil_datatype.Typ.pretty typeinfo.ttype @@ -9923,7 +9920,7 @@ and doTypedef ghost ((specs, nl): Cabs.name_group) = | TEnum _ -> (* GCC/Clang: "conflicting types" *) error_conflicting_types () | _ -> (* redeclaration in same scope valid only in C11 *) - if not (Kernel.C11.get ()) then error_c11_redefinition () + warn_c11_redefinition () end end else if declared_in_current_scope ~ghost n then diff --git a/src/kernel_services/plugin_entry_points/kernel.ml b/src/kernel_services/plugin_entry_points/kernel.ml index d008d8f7b401dfce81b9cd8e9ad10bcb9913e2df..656d60a3774fceaca97f28f2d8ac9d387ad585c1 100644 --- a/src/kernel_services/plugin_entry_points/kernel.ml +++ b/src/kernel_services/plugin_entry_points/kernel.ml @@ -214,6 +214,9 @@ let wkey_unnamed_typedef = register_warn_category "parser:unnamed-typedef" let wkey_file_not_found = register_warn_category "file:not-found" let () = set_warn_status wkey_file_not_found Log.Wfeedback +let wkey_c11 = register_warn_category "c11" +let () = set_warn_status wkey_c11 Log.Winactive + (* ************************************************************************* *) (** {2 Specialised functors for building kernel parameters} *) (* ************************************************************************* *) @@ -1202,9 +1205,15 @@ let () = Parameter_customize.do_not_reset_on_copy () module C11 = False(struct let option_name = "-c11" - let help = "allow C11 constructs (experimental; partial support only)" + let help = "[DEPRECATED: Use -kernel-warn-key c11 for warnings about usage \ + of some C11 constructions.] \ + This option currently has no effect." let module_name = "C11" end) +let () = C11.add_update_hook + (fun _old _new -> warning "Option -c11 is deprecated and has no effect. \ + Use -kernel-warn-key c11 for warnings about \ + usage of some C11 constructions.") let () = Parameter_customize.set_group parsing let () = Parameter_customize.do_not_reset_on_copy () diff --git a/src/kernel_services/plugin_entry_points/kernel.mli b/src/kernel_services/plugin_entry_points/kernel.mli index 9a652b2683280e37545d7a9d65b4c5cb2494206f..0c9a85462af183fe4fa69472d76847ca85d3c3cf 100644 --- a/src/kernel_services/plugin_entry_points/kernel.mli +++ b/src/kernel_services/plugin_entry_points/kernel.mli @@ -211,6 +211,9 @@ val wkey_unnamed_typedef: warn_category val wkey_file_not_found: warn_category (** Warnings related to missing files during preprocessing/parsing. *) +val wkey_c11: warn_category +(** Warnings related to usage of C11-specific constructions. *) + (* ************************************************************************* *) (** {2 Functors for late option registration} *) (** Kernel_function-related options cannot be registered in this module: diff --git a/src/plugins/e-acsl/scripts/e-acsl-gcc.sh b/src/plugins/e-acsl/scripts/e-acsl-gcc.sh index ec919b1aa4338e53292f2dafaa55e3f0fe2df64d..67d55a79118e03f7660413d1b5091a9698745b60 100755 --- a/src/plugins/e-acsl/scripts/e-acsl-gcc.sh +++ b/src/plugins/e-acsl/scripts/e-acsl-gcc.sh @@ -423,7 +423,7 @@ Options: -E pass additional arguments to the Frama-C preprocessor (e.g. -E \"-Iinclude -DMACRO=1\") -F pass additional options to the Frama-C command line - (e.g. -F -c11) + (e.g. -F -unspecified-access) -o <file> output the generated code to <file> [a.out.frama.c] -O <file> output the generated executables to <file> [a.out, a.out.e-acsl] -M maximize memory-related instrumentation diff --git a/src/plugins/e-acsl/tests/bts/issue-eacsl-40.c b/src/plugins/e-acsl/tests/bts/issue-eacsl-40.c index a449692806591f8493465d496a6533d927511774..2060c4c0fd1881fc6a980b84bb496d5ce5b6f2e1 100644 --- a/src/plugins/e-acsl/tests/bts/issue-eacsl-40.c +++ b/src/plugins/e-acsl/tests/bts/issue-eacsl-40.c @@ -11,7 +11,7 @@ COMMENT: The 'LIBS:' line below disables the filter set by E_ACSL_test.ml LIBS: LOG: @PTEST_NAME@.out.frama.c - OPT: @GLOBAL@ @EACSL@ -cpp-extra-args="-DNO_FCLOSE" -c11 -no-frama-c-stdlib -then-last -print -ocode @PTEST_NAME@.out.frama.c + OPT: @GLOBAL@ @EACSL@ -cpp-extra-args="-DNO_FCLOSE" -no-frama-c-stdlib -then-last -print -ocode @PTEST_NAME@.out.frama.c ENABLED_IF: %{bin-available:gcc} EXECNOW: BIN @PTEST_NAME@.o gcc -Wno-attributes %{dep:@PTEST_NAME@.out.frama.c} -c -o @PTEST_NAME@.o >@DEV_NULL@ 2>@DEV_NULL@ */ diff --git a/src/plugins/variadic/tests/defined/simple.c b/src/plugins/variadic/tests/defined/simple.c index 617d61e43804845cb0e6629c7808156cada69cea..542544b68821662e0b4197473c0c5d6281284815 100644 --- a/src/plugins/variadic/tests/defined/simple.c +++ b/src/plugins/variadic/tests/defined/simple.c @@ -1,6 +1,6 @@ /* run.config -STDOPT: #"-c11" -STDOPT: #"-no-frama-c-stdlib -no-pp-annot -c11" +STDOPT: +STDOPT: #"-no-frama-c-stdlib -no-pp-annot" */ /* The defines and typedefs below avoid issues with Musl: without them, diff --git a/tests/libc/stdnoreturn_h.c b/tests/libc/stdnoreturn_h.c index 8b234faea6a3733b82d7c45f2b7c4f441497edeb..d6d8c9ba6d86ff41cbe42409ae38d047a01803b2 100644 --- a/tests/libc/stdnoreturn_h.c +++ b/tests/libc/stdnoreturn_h.c @@ -1,5 +1,5 @@ /*run.config - STDOPT: #"-c11" + STDOPT: */ #include <stdnoreturn.h> diff --git a/tests/misc/oracle/audit-out.json b/tests/misc/oracle/audit-out.json index 8d1c3de1c501006d251af2aea1021d8751c5d3eb..e4a021a87048620e0f9bd7d91b11dd4756052ff7 100644 --- a/tests/misc/oracle/audit-out.json +++ b/tests/misc/oracle/audit-out.json @@ -67,7 +67,7 @@ "typing:int-conversion", "typing:no-proto" ], "disabled": [ - "CERT:EXP:10", "acsl-float-compare", "file:not-found", + "CERT:EXP:10", "acsl-float-compare", "c11", "file:not-found", "ghost:already-ghost", "parser:decimal-float", "transient-block" ] } diff --git a/tests/rte/invalid_fptr.i b/tests/rte/invalid_fptr.i index 5321e177f81b6ef0d7348de4857caf4335ecb2b3..b159bf10df32ed4f06867bc5fa1f80d14b286970 100644 --- a/tests/rte/invalid_fptr.i +++ b/tests/rte/invalid_fptr.i @@ -1,5 +1,5 @@ /* run.config -STDOPT: +"-c11 -warn-invalid-pointer -print" +STDOPT: +"-warn-invalid-pointer -print" */ struct S { void (*f)(void); } s; diff --git a/tests/syntax/anonymous_comp_init.i b/tests/syntax/anonymous_comp_init.i index b156916cb4efa806686ec7f392c422f4950eae23..96fa6bbc6b37082cefa62b8070b496f4f28f5cf1 100644 --- a/tests/syntax/anonymous_comp_init.i +++ b/tests/syntax/anonymous_comp_init.i @@ -1,5 +1,5 @@ /*run.config - STDOPT: #"-c11" + STDOPT: */ typedef struct { diff --git a/tests/syntax/bts0769.i b/tests/syntax/bts0769.i index b38d53a6b20d3776a58d2bc1549889be0d1fff25..baa5480162a20566cc035c0bae8e356d870236ff 100644 --- a/tests/syntax/bts0769.i +++ b/tests/syntax/bts0769.i @@ -1,5 +1,5 @@ /*run.config - STDOPT: #"-c11" + STDOPT: */ struct s { diff --git a/tests/syntax/built.i b/tests/syntax/built.i index f8eaf83db71b1b5316eb2bb25fbb199afe1c1e5c..25023c3bbc6788a0bfbde988e1a507d7458c7840 100644 --- a/tests/syntax/built.i +++ b/tests/syntax/built.i @@ -1,5 +1,5 @@ /* run.config -STDOPT: +"-machdep gcc_x86_32 -c11" +STDOPT: +"-machdep gcc_x86_32" */ extern __attribute__((const, noreturn)) diff --git a/tests/syntax/generic.c b/tests/syntax/generic.c index 3b504777f36f6fbb28834109f8c66cc05dd04b02..17726aab534ca3727bd74b063ccb58fd833d160c 100644 --- a/tests/syntax/generic.c +++ b/tests/syntax/generic.c @@ -1,16 +1,16 @@ /* run.config EXIT: 1 - STDOPT: - STDOPT: #"-c11 -cpp-extra-args=-DNONE" - STDOPT: #"-c11 -cpp-extra-args=-DTOO_MANY_DEFAULTS" - STDOPT: #"-c11 -cpp-extra-args=-DTOO_MANY_COMPATIBLE" - STDOPT: #"-c11 -cpp-extra-args=-DTOO_MANY_COMPATIBLE2" - STDOPT: #"-c11 -cpp-extra-args=-DTOO_MANY_COMPATIBLE3" - STDOPT: #"-c11 -cpp-extra-args=-DINCOMPLETE_TYPE" - STDOPT: #"-c11 -cpp-extra-args=-DINCOMPATIBLE_QUALIFIED_TYPE" - STDOPT: #"-c11 -cpp-extra-args=-DFUNCTION_TYPE" + STDOPT: #"-kernel-warn-key=c11=abort" + STDOPT: #"-cpp-extra-args=-DNONE" + STDOPT: #"-cpp-extra-args=-DTOO_MANY_DEFAULTS" + STDOPT: #"-cpp-extra-args=-DTOO_MANY_COMPATIBLE" + STDOPT: #"-cpp-extra-args=-DTOO_MANY_COMPATIBLE2" + STDOPT: #"-cpp-extra-args=-DTOO_MANY_COMPATIBLE3" + STDOPT: #"-cpp-extra-args=-DINCOMPLETE_TYPE" + STDOPT: #"-cpp-extra-args=-DINCOMPATIBLE_QUALIFIED_TYPE" + STDOPT: #"-cpp-extra-args=-DFUNCTION_TYPE" EXIT: 0 - STDOPT: #"-c11" + STDOPT: */ // Some tests inspired by llvm/clang/test/Sema/generic-selection.c diff --git a/tests/syntax/oracle/generic.0.res.oracle b/tests/syntax/oracle/generic.0.res.oracle index 57d145f153116886c4841d5ad42da57decb8ec19..8b2cbafb4be762a70b9261856c921a8cad111f23 100644 --- a/tests/syntax/oracle/generic.0.res.oracle +++ b/tests/syntax/oracle/generic.0.res.oracle @@ -1,13 +1,6 @@ [kernel] Parsing generic.c (with preprocessing) -[kernel:parser:conditional-feature] Warning: - _Generic is a C11 keyword, use -c11 option to enable it -[kernel] generic.c:67: - syntax error: - Location: line 67, between columns 28 and 32, before or at token: char - 65 int a = _Generic("abc", char const *: 0); - 66 #endif - 67 int ok1 = _Generic("abc", char*: 0); - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 68 int ok2 = _Generic(1.0, float: 1, double: 0); - 69 int ok3 = _Generic(1L, short: 1, unsigned int: 2, int: 3, long: 0, unsigned long: 5); +[kernel:c11] Warning: _Generic is a C11 keyword +[kernel] User Error: warning c11 treated as fatal error. +[kernel] User Error: stopping on file "generic.c" that has errors. Add '-kernel-msg-key pp' + for preprocessing command. [kernel] Frama-C aborted: invalid user input. diff --git a/tests/syntax/oracle/rename.res.oracle b/tests/syntax/oracle/rename.res.oracle index a0ff551a4ad6d61c41a1faa0d784f93478ebc316..1943c82a48286c302a8cb4351371982f32f55bf8 100644 --- a/tests/syntax/oracle/rename.res.oracle +++ b/tests/syntax/oracle/rename.res.oracle @@ -1,6 +1,4 @@ [kernel] Parsing rename.i (no preprocessing) -[kernel] rename.i:69: Warning: - unnamed fields are a C11 extension (use -c11 to avoid this warning) /* Generated by Frama-C */ struct not_anon { int __anonCompField1 ; diff --git a/tests/syntax/oracle/type_redef.0.res.oracle b/tests/syntax/oracle/type_redef.0.res.oracle deleted file mode 100644 index a27ce4063cd967341e05b9b0a4b2339109995257..0000000000000000000000000000000000000000 --- a/tests/syntax/oracle/type_redef.0.res.oracle +++ /dev/null @@ -1,81 +0,0 @@ -[kernel] Parsing type_redef.i (no preprocessing) -[kernel] type_redef.i:7: User Error: - redefinition of type 'myint' in the same scope is only allowed in C11 (option -c11). - Previous declaration was at type_redef.i:6 -[kernel] type_redef.i:10: User Error: - redefinition of type 'list' in the same scope is only allowed in C11 (option -c11). - Previous declaration was at type_redef.i:9 -[kernel] type_redef.i:13: User Error: - redefinition of type 'st' in the same scope with incompatible type. - Previous declaration was at type_redef.i:12 -[kernel] type_redef.i:18: User Error: - redefinition of type 'u' in the same scope with incompatible type. - Previous declaration was at type_redef.i:17 -[kernel] type_redef.i:21: User Error: - redefinition of 'A' in the same scope. - Previous declaration was at type_redef.i:20 -[kernel] type_redef.i:21: User Error: - redefinition of type 'e' in the same scope with conflicting type. - Previous declaration was at type_redef.i:20 -[kernel] type_redef.i:24: User Error: - redefinition of 'B' in the same scope. - Previous declaration was at type_redef.i:23 -[kernel] type_redef.i:26: User Error: - redefinition of type 'st1' in the same scope with incompatible type. - Previous declaration was at type_redef.i:15 -[kernel:parser:unsupported] type_redef.i:30: Warning: - block-level typedefs currently unsupported; - trying to convert it to a global-level typedef. - Note that this may lead to incoherent error messages. -[kernel] type_redef.i:30: Failure: - redefinition of a typedef in a non-global scope is currently unsupported -[kernel:parser:unsupported] type_redef.i:31: Warning: - block-level typedefs currently unsupported; - trying to convert it to a global-level typedef. - Note that this may lead to incoherent error messages. -[kernel] type_redef.i:31: Failure: - redefinition of a typedef in a non-global scope is currently unsupported -[kernel] type_redef.i:35: User Error: - redefinition of type 'vi' in the same scope with incompatible type. - Previous declaration was at type_redef.i:34 -[kernel] type_redef.i:38: User Error: - redefinition of type 'ci' in the same scope with incompatible type. - Previous declaration was at type_redef.i:37 -[kernel] type_redef.i:41: User Error: - redefinition of type 'ai' in the same scope is only allowed in C11 (option -c11). - Previous declaration was at type_redef.i:40 -[kernel] type_redef.i:44: User Error: - redefinition of type 'ftest_t' in the same scope with incompatible type. - Previous declaration was at type_redef.i:43 -[kernel] type_redef.i:48: User Error: - redefinition of type 'stt' in the same scope is only allowed in C11 (option -c11). - Previous declaration was at type_redef.i:47 -[kernel] type_redef.i:49: User Error: - redefinition of type 'stt' in the same scope with incompatible type. - Previous declaration was at type_redef.i:47 -[kernel:parser:unsupported] type_redef.i:53: Warning: - block-level typedefs currently unsupported; - trying to convert it to a global-level typedef. - Note that this may lead to incoherent error messages. -[kernel] type_redef.i:53: Failure: - redefinition of a typedef in a non-global scope is currently unsupported -[kernel:parser:unsupported] type_redef.i:57: Warning: - block-level typedefs currently unsupported; - trying to convert it to a global-level typedef. - Note that this may lead to incoherent error messages. -[kernel] type_redef.i:57: Failure: - redefinition of a typedef in a non-global scope is currently unsupported -[kernel:parser:unsupported] type_redef.i:62: Warning: - block-level typedefs currently unsupported; - trying to convert it to a global-level typedef. - Note that this may lead to incoherent error messages. -[kernel] type_redef.i:62: Failure: - redefinition of a typedef in a non-global scope is currently unsupported -[kernel:parser:unsupported] type_redef.i:63: Warning: - block-level typedefs currently unsupported; - trying to convert it to a global-level typedef. - Note that this may lead to incoherent error messages. -[kernel] type_redef.i:63: Failure: - redefinition of a typedef in a non-global scope is currently unsupported -[kernel] User Error: stopping on file "type_redef.i" that has errors. -[kernel] Frama-C aborted: invalid user input. diff --git a/tests/syntax/oracle/type_redef.1.res.oracle b/tests/syntax/oracle/type_redef.res.oracle similarity index 100% rename from tests/syntax/oracle/type_redef.1.res.oracle rename to tests/syntax/oracle/type_redef.res.oracle diff --git a/tests/syntax/static_assert.c b/tests/syntax/static_assert.c index 93ca57c958c5e284805fa5172a85fa675c5bc359..96821ed7fa9163f6242266b66d28863ae61526f3 100644 --- a/tests/syntax/static_assert.c +++ b/tests/syntax/static_assert.c @@ -1,7 +1,7 @@ /* run.config - STDOPT: #"-c11" + STDOPT: #"" EXIT: 1 - STDOPT: #"-c11 -cpp-extra-args=-DFAIL" + STDOPT: #"-cpp-extra-args=-DFAIL" */ _Static_assert(1, "string"); diff --git a/tests/syntax/thread.i b/tests/syntax/thread.i index 9cbb150145707a58775d960f1efada95ef0b9d1c..495f177b0f08babbe0b38918e326e52d6cb8e0f0 100644 --- a/tests/syntax/thread.i +++ b/tests/syntax/thread.i @@ -1,5 +1,5 @@ /* run.config - STDOPT: +"-machdep gcc_x86_32 -c11" + STDOPT: +"-machdep gcc_x86_32" */ __thread int a; diff --git a/tests/syntax/type_redef.i b/tests/syntax/type_redef.i index 2c56c35150bac395c2cbd72c1479e474c39ce1d8..5b4415aaacfd228031548eff7f2ed139fd31c3d9 100644 --- a/tests/syntax/type_redef.i +++ b/tests/syntax/type_redef.i @@ -1,7 +1,7 @@ /* run.config EXIT: 1 STDOPT: - STDOPT: #"-c11" + */ // Note: redefinition of local typedefs is currently unsupported typedef int myint; typedef int myint; //valid in C11 only diff --git a/tests/value/oracle/anonymous_field.res.oracle b/tests/value/oracle/anonymous_field.res.oracle index 0f6977d1daf35b8031ba19c3a77e7109fdfd152e..e65919e2d36574d5c3d95800a9d46c2ef24f73e5 100644 --- a/tests/value/oracle/anonymous_field.res.oracle +++ b/tests/value/oracle/anonymous_field.res.oracle @@ -1,6 +1,4 @@ [kernel] Parsing anonymous_field.i (no preprocessing) -[kernel] anonymous_field.i:1: Warning: - unnamed fields are a C11 extension (use -c11 to avoid this warning) [eva] Analyzing a complete application starting at main [eva] Computing initial state [eva] Initial state computed diff --git a/tests/value/volatile.c b/tests/value/volatile.c index 300df2f38b8c9773912b1a704090706eea65a039..c9eccd0e973e6fd9138dd127653d7832fb7e0fed 100644 --- a/tests/value/volatile.c +++ b/tests/value/volatile.c @@ -1,5 +1,5 @@ /* run.config* - STDOPT: +"-no-deps -no-input -no-out -eva-initialization-padding-globals maybe -c11" + STDOPT: +"-no-deps -no-input -no-out -eva-initialization-padding-globals maybe" */ int volatile G = 1;