gcc_attribute_var.c revision 1.1
1/* $NetBSD: gcc_attribute_var.c,v 1.1 2021/07/06 17:33:07 rillig Exp $ */ 2# 3 "gcc_attribute_var.c" 3 4/* 5 * Tests for the GCC __attribute__ for variables. 6 * 7 * https://gcc.gnu.org/onlinedocs/gcc/Variable-Attributes.html 8 */ 9 10void 11write_to_page(unsigned index, char ch) 12{ 13 static char page[4096] 14 __attribute__((__aligned__(4096))); 15 16 page[index] = ch; 17} 18 19void 20placement( 21 __attribute__((__deprecated__)) int before, 22 int __attribute__((__deprecated__)) between, 23 int after __attribute__((__deprecated__)) 24); 25 26/* just to trigger _some_ error, to keep the .exp file */ 27/* expect+1: error: syntax error 'syntax_error' [249] */ 28__attribute__((syntax_error)); 29