This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c/3481: function attributes should apply to function pointers too
- To: gcc-gnats at gcc dot gnu dot org, debian-gcc at lists dot debian dot org
- Subject: c/3481: function attributes should apply to function pointers too
- From: Matthias Klose <doko at klose dot in-berlin dot de>
- Date: Fri, 29 Jun 2001 19:30:38 +0200
- Cc: Richard Kettlewell <rjk at sfere dot greenend dot org dot uk>
- Reply-To: 55298-quiet at bugs dot debian dot org
>Number: 3481
>Category: c
>Synopsis: function attributes should apply to function pointers too
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: unassigned
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Fri Jun 29 10:36:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Richard Kettlewell <rjk@sfere.greenend.org.uk>
>Release: 3.0 (Debian)
>Organization:
The Debian project
>Environment:
System: Debian GNU/Linux
Architecture: i386
host: i386-linux
build: i386-linux
target: i386-linux
configured with: ../src/configure -v --enable-languages=c,c++,java,f77,proto,objc --prefix=/usr --infodir=/share/info --mandir=/share/man --enable-shared --with-gnu-as --with-gnu-ld --with-system-zlib --enable-long-long --enable-nls --without-included-gettext --disable-checking --enable-threads=posix --enable-java-gc=boehm --with-cpp-install-dir=bin --enable-objc-gc i386-linux
>Description:
[Reported to the Debian BTS as report #55298.
Please CC 55298-quiet@bugs.debian.org on replies.
Log of report can be found at http://bugs.debian.org/55298
]
Function attributes, such as `noreturn' and `format', should be
allowed to be specified for function pointers as well as real
functions.
lyonesse$ cat t.c
extern void (*error)(int, const char *, ...)
__attribute__((noreturn))
__attribute__((format(printf, 2, 3)));
$ gcc -c t.c
t.c:3: argument format specified for non-function `error'
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: