Commit 1bec9d5f by Mike Stump

c1x --> c11.

From-SVN: r203927
parent 574733d3
/* Test C1X alignment support. Test valid code. */
/* Test C11 alignment support. Test valid code. */
/* { dg-do compile } */
/* { dg-options "-std=c1x -pedantic-errors" } */
/* { dg-options "-std=c11 -pedantic-errors" } */
#include <stddef.h>
......
/* Test C1X alignment support. Test valid code using stdalign.h. */
/* Test C11 alignment support. Test valid code using stdalign.h. */
/* { dg-do run } */
/* { dg-options "-std=c1x -pedantic-errors" } */
/* { dg-options "-std=c11 -pedantic-errors" } */
#include <stdalign.h>
#include <stddef.h>
......
/* Test C1X alignment support. Test invalid code. */
/* Test C11 alignment support. Test invalid code. */
/* { dg-do compile } */
/* { dg-options "-std=c1x -pedantic-errors" } */
/* { dg-options "-std=c11 -pedantic-errors" } */
int a = _Alignof (void (void)); /* { dg-error "function" } */
struct s;
......
/* Test C1X alignment support. Test reducing alignment (assumes there
/* Test C11 alignment support. Test reducing alignment (assumes there
are at least some alignment constraints). */
/* { dg-do compile } */
/* { dg-options "-std=c1x -pedantic-errors" } */
/* { dg-options "-std=c11 -pedantic-errors" } */
/* { dg-skip-if "no alignment constraints" { "avr-*-*" } { "*" } { "" } } */
#include <stddef.h>
......
/* Test C1X alignment support. Test invalid code. */
/* Test C11 alignment support. Test invalid code. */
/* { dg-do compile } */
/* { dg-options "-std=c1x -pedantic-errors" } */
/* { dg-options "-std=c11 -pedantic-errors" } */
void foo (int []);
void bar1 (int [_Alignas (double) 10]); /* { dg-error "expected expression before" } */
......
/* Test for anonymous structures and unions in C1X. */
/* Test for anonymous structures and unions in C11. */
/* { dg-do compile } */
/* { dg-options "-std=c1x -pedantic-errors" } */
/* { dg-options "-std=c11 -pedantic-errors" } */
#include <stddef.h>
......
/* Test for anonymous structures and unions in C1X. Test for invalid
/* Test for anonymous structures and unions in C11. Test for invalid
cases. */
/* { dg-do compile } */
/* { dg-options "-std=c1x -pedantic-errors" } */
/* { dg-options "-std=c11 -pedantic-errors" } */
typedef struct s0
{
......
/* Test for anonymous structures and unions in C1X. Test for invalid
/* Test for anonymous structures and unions in C11. Test for invalid
cases: typedefs disallowed by N1549. */
/* { dg-do compile } */
/* { dg-options "-std=c1x -pedantic-errors" } */
/* { dg-options "-std=c11 -pedantic-errors" } */
typedef struct
{
......
/* Test for <float.h> C1X macros. */
/* Test for <float.h> C11 macros. */
/* Origin: Joseph Myers <joseph@codesourcery.com> */
/* { dg-do preprocess } */
/* { dg-options "-std=c1x -pedantic-errors" } */
/* { dg-options "-std=c11 -pedantic-errors" } */
/* This test checks that the C1X macros are defined;
/* This test checks that the C11 macros are defined;
it does not check the correctness of their values. */
#include <float.h>
......
/* Test C1X _Noreturn. Test valid code. */
/* Test C11 _Noreturn. Test valid code. */
/* { dg-do compile } */
/* { dg-options "-std=c1x -pedantic-errors" } */
/* { dg-options "-std=c11 -pedantic-errors" } */
_Noreturn void exit (int);
......
/* Test C1X _Noreturn. Test valid code using stdnoreturn.h. */
/* Test C11 _Noreturn. Test valid code using stdnoreturn.h. */
/* { dg-do run } */
/* { dg-options "-std=c1x -pedantic-errors" } */
/* { dg-options "-std=c11 -pedantic-errors" } */
#include <stdnoreturn.h>
......
/* Test C1X _Noreturn. Test _Noreturn on main, hosted. */
/* Test C11 _Noreturn. Test _Noreturn on main, hosted. */
/* { dg-do compile } */
/* { dg-options "-std=c1x -pedantic-errors -fhosted" } */
/* { dg-options "-std=c11 -pedantic-errors -fhosted" } */
_Noreturn void exit (int);
......
/* Test C1X _Noreturn. Test _Noreturn on main, freestanding. */
/* Test C11 _Noreturn. Test _Noreturn on main, freestanding. */
/* { dg-do compile } */
/* { dg-options "-std=c1x -pedantic-errors -ffreestanding" } */
/* { dg-options "-std=c11 -pedantic-errors -ffreestanding" } */
_Noreturn void exit (int);
......
/* Test C1X _Noreturn. Test invalid uses. */
/* Test C11 _Noreturn. Test invalid uses. */
/* { dg-do compile } */
/* { dg-options "-std=c1x -pedantic-errors" } */
/* { dg-options "-std=c11 -pedantic-errors" } */
_Noreturn struct s; /* { dg-error "empty declaration" } */
......
/* Test C1X constraint against pointer / floating-point casts. */
/* Test C11 constraint against pointer / floating-point casts. */
/* { dg-do compile } */
/* { dg-options "-std=c1x -pedantic-errors" } */
/* { dg-options "-std=c11 -pedantic-errors" } */
void *p;
float f;
......
/* Test C1X static assertions. Valid assertions. */
/* Test C11 static assertions. Valid assertions. */
/* { dg-do compile } */
/* { dg-options "-std=c1x -pedantic-errors" } */
/* { dg-options "-std=c11 -pedantic-errors" } */
_Static_assert (1, "foo");
......
/* Test C1X static assertions. Failed assertions. */
/* Test C11 static assertions. Failed assertions. */
/* { dg-do compile } */
/* { dg-options "-std=c1x -pedantic-errors" } */
/* { dg-options "-std=c11 -pedantic-errors" } */
_Static_assert (0, "assert1"); /* { dg-error "static assertion failed: \"assert1\"" } */
......
/* Test C1X static assertions. Invalid assertions. */
/* Test C11 static assertions. Invalid assertions. */
/* { dg-do compile } */
/* { dg-options "-std=c1x -pedantic-errors" } */
/* { dg-options "-std=c11 -pedantic-errors" } */
_Static_assert (__INT_MAX__ * 2, "overflow"); /* { dg-warning "integer overflow in expression" } */
/* { dg-error "overflow in constant expression" "error" { target *-*-* } 5 } */
......
/* Test C1X static assertions. More invalid assertions. */
/* Test C11 static assertions. More invalid assertions. */
/* { dg-do compile } */
/* { dg-options "-std=c1x -pedantic-errors" } */
/* { dg-options "-std=c11 -pedantic-errors" } */
/* Static assertions not valid in old-style parameter declarations
because declarations there must have declarators. */
......
/* Test C1X static assertions. Non-constant-expression without -pedantic. */
/* Test C11 static assertions. Non-constant-expression without -pedantic. */
/* { dg-do compile } */
/* { dg-options "-std=c1x" } */
/* { dg-options "-std=c11" } */
_Static_assert ((int)(1.0 + 1.0), "non-constant-expression");
/* Test C1X static assertions. Non-constant-expression with -pedantic. */
/* Test C11 static assertions. Non-constant-expression with -pedantic. */
/* { dg-do compile } */
/* { dg-options "-std=c1x -pedantic" } */
/* { dg-options "-std=c11 -pedantic" } */
_Static_assert ((int)(1.0 + 1.0), "non-constant-expression"); /* { dg-warning "not an integer constant expression" } */
/* Test typedef redeclaration in C1X. */
/* Test typedef redeclaration in C11. */
/* { dg-do compile } */
/* { dg-options "-std=c1x -pedantic-errors" } */
/* { dg-options "-std=c11 -pedantic-errors" } */
/* C1X permits typedefs to be redeclared to the same type, but not to
/* C11 permits typedefs to be redeclared to the same type, but not to
different-but-compatible types, and not when the type is variably
modified. */
......
/* Test Unicode strings in C1X. Test valid code. */
/* Test Unicode strings in C11. Test valid code. */
/* { dg-do run } */
/* { dg-options "-std=c1x -pedantic-errors" } */
/* { dg-options "-std=c11 -pedantic-errors" } */
/* More thorough tests are in c-c++-common/raw-string-*.c; this test
verifies the particular subset (Unicode but not raw strings) that
is in C1X. */
is in C11. */
typedef __CHAR16_TYPE__ char16_t;
typedef __CHAR32_TYPE__ char32_t;
......
/* Test Unicode strings in C1X. Test constraint. */
/* Test Unicode strings in C11. Test constraint. */
/* { dg-do compile } */
/* { dg-options "-std=c1x -pedantic-errors" } */
/* { dg-options "-std=c11 -pedantic-errors" } */
const void *p1 = L"a" u8"b"; /* { dg-error "concatenation" } */
const void *p2 = L"a" "b" u8"c"; /* { dg-error "concatenation" } */
......
......@@ -3,7 +3,7 @@
/* { dg-do preprocess } */
/* { dg-options "-std=iso9899:1990 -pedantic-errors" } */
/* This test checks that the C90 macros (but not the C99 or C1X ones)
/* This test checks that the C90 macros (but not the C99 or C11 ones)
are defined; it does not check the correctness of their values. */
#include <float.h>
......
......@@ -3,7 +3,7 @@
/* { dg-do preprocess } */
/* { dg-options "-std=iso9899:1999 -pedantic-errors" } */
/* This test checks that the C99 macros (but not the C1X ones) are defined;
/* This test checks that the C99 macros (but not the C11 ones) are defined;
it does not check the correctness of their values. */
#include <float.h>
......
/* Test __builtin_complex semantics. */
/* { dg-do run } */
/* { dg-options "-std=c1x -pedantic-errors" } */
/* { dg-options "-std=c11 -pedantic-errors" } */
/* { dg-add-options ieee } */
extern void exit (int);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment