Blame cpp-test/test-t/u_1_1.c
Branch: 8bf002c4dd7c16692efd89375b1fff5ad1fa133d
Packit Service
8bf002
/* u_1_1.c: Undefined behaviors on unterminated line, comment or macro. */
Packit Service
8bf002
Packit Service
8bf002
/* { dg-do preprocess } */
Packit Service
8bf002
Packit Service
8bf002
/* u.1.1: End of a source file without <newline>. */
Packit Service
8bf002
#include "unbal3.h"
Packit Service
8bf002
/* { dg-error "u_1_1\.c:6:\n\[^ \]*( error:|) (no newline at end of file|file does not end in newline)| End of file with no newline" "" { target *-*-* } 0 } */
Packit Service
8bf002
int e_1;
Packit Service
8bf002
Packit Service
8bf002
/* u.1.2: End of a source file with <backslash><newline>. */
Packit Service
8bf002
#include "unbal4.h"
Packit Service
8bf002
/* { dg-error "u_1_1\.c:11:\n\[^ \]*( error:|) backslash-newline at end of file| End of file with \\\\" "" { target *-*-* } 0 } */
Packit Service
8bf002
;
Packit Service
8bf002
Packit Service
8bf002
/* u.1.3: End of a source file with an unterminated comment. */
Packit Service
8bf002
#include "unbal5.h"
Packit Service
8bf002
/* { dg-error "u_1_1\.c:16:\n\[^ \]*( error:|) unterminated comment| End of file with unterminated comment" "" { target *-*-* } 0 } */
Packit Service
8bf002
*/
Packit Service
8bf002
Packit Service
8bf002
/* u.1.4: End of a source file with an uncompleted macro call. */
Packit Service
8bf002
#include "unbal6.h"
Packit Service
8bf002
/* { dg-error "u_1_1\.c:21:\n\[^ \]*( error:|) unterminated (argument list|macro call)| End of file within macro call" "" { target *-*-* } 0 } */
Packit Service
8bf002
y);
Packit Service
8bf002