Bug 3481 - function attributes should apply to function pointers too
Summary: function attributes should apply to function pointers too
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: c (show other bugs)
Version: 3.0
: P3 enhancement
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-06-29 10:36 UTC by 55298-quiet
Modified: 2020-03-18 20:43 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2005-09-10 16:20:36


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description 55298-quiet 2001-06-29 10:36:01 UTC
[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'

Release:
3.0 (Debian)

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
Comment 1 Joseph S. Myers 2001-10-05 11:39:08 UTC
State-Changed-From-To: open->analyzed
State-Changed-Why: Format attributes now (mainline) apply properly to function types,
    using the documented syntax.  Noreturn attributes work
    in the case given, but not yet in general on types, only
    on declarations of functions or pointers to functions;
    and there are other function attributes that ought
    to apply to types but currently only apply to decls.
Comment 2 Andrew Pinski 2005-12-10 05:42:36 UTC
Format now applies to function types for at least 4.1.0 and above.
Comment 3 owner 2020-03-16 17:24:08 UTC Comment hidden (spam)
Comment 4 owner 2020-03-16 17:27:08 UTC Comment hidden (spam)
Comment 5 owner 2020-03-16 17:30:07 UTC Comment hidden (spam)
Comment 6 owner 2020-03-16 17:33:04 UTC Comment hidden (spam)
Comment 7 owner 2020-03-16 17:36:08 UTC Comment hidden (spam)
Comment 8 owner 2020-03-16 17:39:05 UTC Comment hidden (spam)
Comment 9 owner 2020-03-16 17:42:05 UTC Comment hidden (spam)
Comment 10 owner 2020-03-16 17:45:05 UTC Comment hidden (spam)
Comment 11 owner 2020-03-16 17:48:06 UTC Comment hidden (spam)
Comment 12 owner 2020-03-16 17:51:11 UTC Comment hidden (spam)
Comment 13 owner 2020-03-16 17:54:07 UTC Comment hidden (spam)
Comment 14 owner 2020-03-16 17:57:08 UTC Comment hidden (spam)
Comment 15 owner 2020-03-16 18:00:06 UTC Comment hidden (spam)
Comment 16 owner 2020-03-16 18:03:05 UTC Comment hidden (spam)
Comment 17 owner 2020-03-16 18:06:05 UTC Comment hidden (spam)
Comment 18 owner 2020-03-16 18:09:29 UTC Comment hidden (spam)
Comment 19 owner 2020-03-16 18:12:06 UTC Comment hidden (spam)
Comment 20 owner 2020-03-16 18:15:09 UTC Comment hidden (spam)
Comment 21 owner 2020-03-16 18:18:08 UTC Comment hidden (spam)
Comment 22 owner 2020-03-16 18:21:10 UTC Comment hidden (spam)
Comment 23 owner 2020-03-16 18:24:09 UTC Comment hidden (spam)
Comment 24 owner 2020-03-16 18:27:05 UTC Comment hidden (spam)
Comment 25 owner 2020-03-16 18:27:21 UTC Comment hidden (spam)
Comment 26 owner 2020-03-16 18:27:21 UTC Comment hidden (spam)
Comment 27 owner 2020-03-16 18:30:06 UTC Comment hidden (spam)
Comment 28 owner 2020-03-16 18:30:06 UTC Comment hidden (spam)
Comment 29 owner 2020-03-16 18:30:08 UTC Comment hidden (spam)
Comment 30 owner 2020-03-16 18:33:06 UTC Comment hidden (spam)
Comment 31 owner 2020-03-16 19:09:05 UTC Comment hidden (spam)
Comment 32 owner 2020-03-16 19:12:09 UTC Comment hidden (spam)
Comment 33 owner 2020-03-16 19:15:04 UTC Comment hidden (spam)
Comment 34 owner 2020-03-16 19:57:07 UTC Comment hidden (spam)
Comment 35 owner 2020-03-16 19:57:08 UTC Comment hidden (spam)
Comment 36 owner 2020-03-16 20:00:07 UTC Comment hidden (spam)
Comment 37 owner 2020-03-16 20:00:08 UTC Comment hidden (spam)
Comment 38 owner 2020-03-16 20:03:05 UTC Comment hidden (spam)
Comment 39 owner 2020-03-16 20:03:06 UTC Comment hidden (spam)
Comment 40 owner 2020-03-16 20:06:11 UTC Comment hidden (spam)
Comment 41 owner 2020-03-16 20:06:11 UTC Comment hidden (spam)
Comment 42 owner 2020-03-16 20:27:08 UTC Comment hidden (spam)
Comment 43 owner 2020-03-16 20:30:05 UTC Comment hidden (spam)
Comment 44 owner 2020-03-16 20:33:09 UTC Comment hidden (spam)
Comment 45 owner 2020-03-16 20:36:05 UTC Comment hidden (spam)
Comment 46 owner 2020-03-16 20:39:06 UTC Comment hidden (spam)
Comment 47 owner 2020-03-16 20:42:07 UTC Comment hidden (spam)
Comment 48 owner 2020-03-16 20:45:05 UTC Comment hidden (spam)
Comment 49 owner 2020-03-16 20:48:05 UTC Comment hidden (spam)
Comment 50 owner 2020-03-16 20:51:10 UTC Comment hidden (spam)
Comment 51 owner 2020-03-16 20:54:09 UTC Comment hidden (spam)
Comment 52 owner 2020-03-16 20:57:14 UTC Comment hidden (spam)
Comment 53 owner 2020-03-16 21:00:05 UTC Comment hidden (spam)
Comment 54 owner 2020-03-16 21:09:05 UTC Comment hidden (spam)
Comment 55 owner 2020-03-16 21:51:07 UTC Comment hidden (spam)
Comment 56 owner 2020-03-16 21:51:08 UTC Comment hidden (spam)
Comment 57 owner 2020-03-16 21:54:06 UTC Comment hidden (spam)
Comment 58 owner 2020-03-16 21:54:07 UTC Comment hidden (spam)
Comment 59 owner 2020-03-16 22:36:06 UTC Comment hidden (spam)
Comment 60 owner 2020-03-16 22:36:06 UTC Comment hidden (spam)
Comment 61 owner 2020-03-16 22:39:05 UTC Comment hidden (spam)
Comment 62 owner 2020-03-16 23:15:08 UTC Comment hidden (spam)
Comment 63 owner 2020-03-16 23:18:05 UTC Comment hidden (spam)
Comment 64 owner 2020-03-16 23:39:06 UTC Comment hidden (spam)
Comment 65 owner 2020-03-16 23:42:05 UTC Comment hidden (spam)
Comment 66 owner 2020-03-16 23:45:06 UTC Comment hidden (spam)
Comment 67 owner 2020-03-17 00:27:04 UTC Comment hidden (spam)
Comment 68 owner 2020-03-17 00:30:05 UTC Comment hidden (spam)
Comment 69 owner 2020-03-17 00:33:07 UTC Comment hidden (spam)
Comment 70 owner 2020-03-17 00:36:04 UTC Comment hidden (spam)
Comment 71 owner 2020-03-17 00:39:06 UTC Comment hidden (spam)
Comment 72 owner 2020-03-17 00:42:04 UTC Comment hidden (spam)
Comment 73 owner 2020-03-17 00:45:05 UTC Comment hidden (spam)
Comment 74 owner 2020-03-17 00:48:05 UTC Comment hidden (spam)
Comment 75 owner 2020-03-17 00:51:05 UTC Comment hidden (spam)
Comment 76 owner 2020-03-17 00:54:04 UTC Comment hidden (spam)
Comment 77 owner 2020-03-17 00:57:05 UTC Comment hidden (spam)
Comment 78 owner 2020-03-17 01:00:05 UTC Comment hidden (spam)
Comment 79 owner 2020-03-17 01:09:05 UTC Comment hidden (spam)
Comment 80 owner 2020-03-17 01:12:05 UTC Comment hidden (spam)
Comment 81 owner 2020-03-17 01:15:08 UTC Comment hidden (spam)
Comment 82 owner 2020-03-17 01:18:06 UTC Comment hidden (spam)
Comment 83 owner 2020-03-17 01:21:04 UTC Comment hidden (spam)
Comment 84 owner 2020-03-17 01:24:05 UTC Comment hidden (spam)
Comment 85 owner 2020-03-17 01:24:59 UTC Comment hidden (spam)
Comment 86 owner 2020-03-17 01:27:07 UTC Comment hidden (spam)
Comment 87 owner 2020-03-17 02:06:05 UTC Comment hidden (spam)
Comment 88 owner 2020-03-17 02:24:08 UTC Comment hidden (spam)
Comment 89 owner 2020-03-17 02:27:05 UTC Comment hidden (spam)
Comment 90 owner 2020-03-17 02:45:05 UTC Comment hidden (spam)
Comment 91 owner 2020-03-17 03:06:05 UTC Comment hidden (spam)
Comment 92 owner 2020-03-17 03:09:05 UTC Comment hidden (spam)
Comment 93 owner 2020-03-17 03:12:04 UTC Comment hidden (spam)
Comment 94 owner 2020-03-17 03:15:05 UTC Comment hidden (spam)
Comment 95 owner 2020-03-17 03:18:05 UTC Comment hidden (spam)
Comment 96 owner 2020-03-17 03:30:04 UTC Comment hidden (spam)
Comment 97 owner 2020-03-17 03:51:06 UTC Comment hidden (spam)
Comment 98 owner 2020-03-17 03:54:07 UTC Comment hidden (spam)
Comment 99 owner 2020-03-17 03:54:08 UTC Comment hidden (spam)
Comment 100 owner 2020-03-17 03:57:05 UTC Comment hidden (spam)
Comment 101 owner 2020-03-17 04:36:07 UTC Comment hidden (spam)
Comment 102 owner 2020-03-17 04:36:07 UTC Comment hidden (spam)
Comment 103 owner 2020-03-17 05:15:05 UTC Comment hidden (spam)
Comment 104 owner 2020-03-17 05:15:06 UTC Comment hidden (spam)
Comment 105 owner 2020-03-17 05:57:05 UTC Comment hidden (spam)
Comment 106 owner 2020-03-17 05:57:06 UTC Comment hidden (spam)
Comment 107 owner 2020-03-17 06:00:07 UTC Comment hidden (spam)
Comment 108 owner 2020-03-17 06:00:08 UTC Comment hidden (spam)
Comment 109 owner 2020-03-17 06:39:05 UTC Comment hidden (spam)
Comment 110 owner 2020-03-17 06:39:07 UTC Comment hidden (spam)
Comment 111 owner 2020-03-17 07:21:06 UTC Comment hidden (spam)
Comment 112 owner 2020-03-17 07:21:06 UTC Comment hidden (spam)
Comment 113 owner 2020-03-17 07:24:20 UTC Comment hidden (spam)
Comment 114 owner 2020-03-17 07:33:06 UTC Comment hidden (spam)
Comment 115 owner 2020-03-17 07:36:05 UTC Comment hidden (spam)
Comment 116 owner 2020-03-17 07:39:05 UTC Comment hidden (spam)
Comment 117 owner 2020-03-17 07:42:05 UTC Comment hidden (spam)
Comment 118 owner 2020-03-17 07:45:06 UTC Comment hidden (spam)
Comment 119 owner 2020-03-17 07:48:06 UTC Comment hidden (spam)
Comment 120 owner 2020-03-17 07:51:05 UTC Comment hidden (spam)
Comment 121 owner 2020-03-17 07:54:05 UTC Comment hidden (spam)
Comment 122 owner 2020-03-17 07:57:06 UTC Comment hidden (spam)
Comment 123 owner 2020-03-17 08:15:06 UTC Comment hidden (spam)
Comment 124 owner 2020-03-17 08:36:08 UTC Comment hidden (spam)
Comment 125 Chris Faylor 2020-03-18 20:43:58 UTC
Trying to trigger a response from bugs.debian.org to see how we're suppressing the X-Loop header.