view gcc/testsuite/g++.dg/ext/attrib1.C @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
line wrap: on
line source

// Test for interpretation of attribute immediately before function name.
// Origin: Joseph Myers <jsm28@cam.ac.uk>
// { dg-do compile }

// An attribute immediately before the function name should in this
// case properly apply to the return type, but compatibility with
// existing code using this form requires it to apply to the function
// type instead in the case of attributes applying to function types,
// and to the declaration in the case of attributes applying to declarations.
int ****__attribute__((format(printf, 1, 2))) foo(const char *, ...);