First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 3481
Product:  
Component:  
Status: NEW
Resolution:
Assigned To: Not yet assigned to anyone <unassigned@gcc.gnu.org>
Host:
Reported against  
Priority:  
Severity:  
Target Milestone:  
 
 
Target:
Reporter: 55298-quiet@bugs.debian.org
Add CC:
CC:
Remove selected CCs
Build:
URL:
Summary:
Keywords:
Known to work:
Known to fail:

Attachment Description Type Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 3481 depends on: Show dependency tree
Show dependency graph
Bug 3481 blocks:

Additional Comments:





Mark bug as waiting for feedback
Mark bug as suspended




View Bug Activity   |   Format For Printing   |   Clone This Bug


Description:   Last confirmed: 2005-09-10 16:20 Opened: 2001-06-29 10:36
[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 From Joseph S. Myers 2001-10-05 11:39 -------
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 From Andrew Pinski 2005-12-10 05:42 -------
Format now applies to function types for at least 4.1.0 and above.

First Last Prev Next    No search results available      Search page      Enter new bug