diff --git a/tests/syntax/empty_union.i b/tests/syntax/empty_union.i new file mode 100644 index 0000000000000000000000000000000000000000..e941af4a437ce3eadf03caeac31baa9ef2e1f397 --- /dev/null +++ b/tests/syntax/empty_union.i @@ -0,0 +1,8 @@ +/* run.config* + STDOPT: +"-machdep gcc_x86_32" + EXIT: 1 + STDOPT: + */ + +// based on GCC's 'torture' test suite +union empty {} eu = {}; diff --git a/tests/syntax/oracle/empty_union.0.res.oracle b/tests/syntax/oracle/empty_union.0.res.oracle new file mode 100644 index 0000000000000000000000000000000000000000..d977ab5bccffb0eebe01b9eda61d7735c5ee86ef --- /dev/null +++ b/tests/syntax/oracle/empty_union.0.res.oracle @@ -0,0 +1,7 @@ +[kernel] Parsing empty_union.i (no preprocessing) +/* Generated by Frama-C */ +union empty { + +}; +union empty eu = ; + diff --git a/tests/syntax/oracle/empty_union.1.res.oracle b/tests/syntax/oracle/empty_union.1.res.oracle new file mode 100644 index 0000000000000000000000000000000000000000..09d71d5930c6ebb3673f428c2f8350120e262f5f --- /dev/null +++ b/tests/syntax/oracle/empty_union.1.res.oracle @@ -0,0 +1,10 @@ +[kernel] Parsing empty_union.i (no preprocessing) +[kernel] empty_union.i:8: User Error: + empty unions only allowed for GCC/MSVC machdeps; see option -machdep or run 'frama-c -machdep help' for the list of available machdeps +[kernel] empty_union.i:8: User Error: + empty initializers only allowed for GCC/MSVC machdeps; see option -machdep or run 'frama-c -machdep help' for the list of available machdeps + 6 + 7 // based on GCC's 'torture' test suite + 8 union empty {} eu = {}; + ^^ +[kernel] Frama-C aborted: invalid user input.