Module Name: src
Committed By: rillig
Date: Sun Jul 25 19:22:08 UTC 2021
Modified Files:
src/tests/usr.bin/xlint/lint1: parse_type_name.c parse_type_name.exp
Log Message:
tests/lint: fix unintended line breaks
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/xlint/lint1/parse_type_name.c \
src/tests/usr.bin/xlint/lint1/parse_type_name.exp
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/tests/usr.bin/xlint/lint1/parse_type_name.c
diff -u src/tests/usr.bin/xlint/lint1/parse_type_name.c:1.4 src/tests/usr.bin/xlint/lint1/parse_type_name.c:1.5
--- src/tests/usr.bin/xlint/lint1/parse_type_name.c:1.4 Sun Jul 25 15:48:58 2021
+++ src/tests/usr.bin/xlint/lint1/parse_type_name.c Sun Jul 25 19:22:08 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: parse_type_name.c,v 1.4 2021/07/25 15:48:58 rillig Exp $ */
+/* $NetBSD: parse_type_name.c,v 1.5 2021/07/25 19:22:08 rillig Exp $ */
# 3 "parse_type_name.c"
/*
@@ -80,29 +80,17 @@ cover_direct_abstract_declarator(void)
/* cover 'abstract_decl_param_list asm_or_symbolrename_opt' */
sink(sizeof(int(double)));
- sink(sizeof(
- int(
- double) __asm("anything")));
- sink(sizeof(
- int(
- double) __symbolrename(alias)));
+ sink(sizeof(int(double) __asm("anything")));
+ sink(sizeof(int(double) __symbolrename(alias)));
/* cover 'direct_abstract_declarator abstract_decl_param_list asm_or_symbolrename_opt' */
sink(sizeof(int (*)(double)));
- sink(sizeof(
- int(*)(double) __asm("anything")));
- sink(sizeof(
- int(*)
- (double)__symbolrename(alias)));
+ sink(sizeof(int (*)(double) __asm("anything")));
+ sink(sizeof(int (*)(double)__symbolrename(alias)));
/* cover 'direct_abstract_declarator type_attribute_list' */
- sink(sizeof(
- int(*)
- __attribute__(())));
- sink(sizeof(
- int(*)
- __attribute__(())
- __attribute__(())));
+ sink(sizeof(int (*) __attribute__(())));
+ sink(sizeof(int (*) __attribute__(()) __attribute__(())));
}
void
@@ -110,32 +98,21 @@ cover_abstract_decl_param_list(void)
{
/* cover 'abstract_decl_lparen T_RPAREN type_attribute_opt' */
sink(sizeof(void (*)()));
- sink(sizeof(
- void (*)
- ()
- __attribute__(())));
+ sink(sizeof(void (*)() __attribute__(())));
/*
* XXX: The grammar allows only a single type_attribute_opt.
* Where does the second type_attribute go?
*/
sink(sizeof(
- void (*)
- ()
- __attribute__(())
- __attribute__(())));
+ void (*)() __attribute__(()) __attribute__(())));
/* cover 'abstract_decl_lparen vararg_parameter_type_list T_RPAREN type_attribute_opt' */
- sink(sizeof(
- void (*)
- (void)__attribute__(())));
+ sink(sizeof(void (*)(void) __attribute__(())));
/*
* XXX: The grammar allows only a single type_attribute_opt.
* Where does the second type_attribute go?
*/
- sink(sizeof(
- void (*)
- (void)__attribute__(())
- __attribute__(())));
+ sink(sizeof(void (*)(void) __attribute__(()) __attribute__(())));
/* cover 'abstract_decl_lparen error T_RPAREN type_attribute_opt' */
/* expect+1: syntax error 'goto' [249] */
@@ -193,8 +170,7 @@ cover_parameter_declaration(void)
/* cover 'begin_type_declmods end_type abstract_declarator' */
/* GCC 11 warns: type defaults to 'int' in type name */
- sink(sizeof(
- void (*)(int, const *)));
+ sink(sizeof(void (*)(int, const *)));
/* cover 'begin_type_declaration_specifiers end_type abstract_declarator' */
sink(sizeof(void (*)(int, double *)));
Index: src/tests/usr.bin/xlint/lint1/parse_type_name.exp
diff -u src/tests/usr.bin/xlint/lint1/parse_type_name.exp:1.4 src/tests/usr.bin/xlint/lint1/parse_type_name.exp:1.5
--- src/tests/usr.bin/xlint/lint1/parse_type_name.exp:1.4 Sun Jul 25 15:48:58 2021
+++ src/tests/usr.bin/xlint/lint1/parse_type_name.exp Sun Jul 25 19:22:08 2021
@@ -1,7 +1,7 @@
parse_type_name.c(52): error: cannot take size/alignment of function [144]
parse_type_name.c(72): error: null dimension [17]
parse_type_name.c(76): error: null dimension [17]
-parse_type_name.c(142): error: syntax error 'goto' [249]
-parse_type_name.c(144): error: syntax error 'goto' [249]
-parse_type_name.c(150): error: syntax error 'goto' [249]
-parse_type_name.c(164): warning: ANSI C requires formal parameter before '...' [84]
+parse_type_name.c(119): error: syntax error 'goto' [249]
+parse_type_name.c(121): error: syntax error 'goto' [249]
+parse_type_name.c(127): error: syntax error 'goto' [249]
+parse_type_name.c(141): warning: ANSI C requires formal parameter before '...' [84]