public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c/6902: stdcall function attribute doesn't work any longer
@ 2002-06-01 15:06 Matthias Klose
  0 siblings, 0 replies; 2+ messages in thread
From: Matthias Klose @ 2002-06-01 15:06 UTC (permalink / raw)
  To: gcc-gnats, debian-gcc


>Number:         6902
>Category:       c
>Synopsis:       stdcall function attribute doesn't work any longer
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jun 01 15:06:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     markus.oberhumer@jk.uni-linz.ac.at
>Release:        3.1 (Debian) (Debian unstable)
>Organization:
The Debian Project
>Environment:
System: Debian GNU/Linux (unstable)
Architecture: i686
	
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name           Version        Description
+++-==============-==============-============================================
ii  gcc-3.1        3.1-2          The GNU C compiler.
ii  binutils       2.12.90.0.7-1  The GNU assembler, linker and binary utiliti
ii  libc6          2.2.5-6        GNU C Library: Shared libraries and Timezone
host: i386-linux
configured with: /mnt/data/gcc-3.1/gcc-3.1-3.1ds2/src/configure -v --enable-languages=c,c++,java,f77,proto,objc,ada --prefix=/usr --mandir=$\(prefix\)/share/man --infodir=$\(prefix\)/share/info --with-gxx-include-dir=$\(prefix\)/include/g++-v3-3.1 --enable-shared --with-system-zlib --enable-long-long --enable-nls --without-included-gettext --enable-clocale=gnu --enable-threads=posix --enable-java-gc=boehm --enable-objc-gc i386-linux
>Description:
[ Reported to the Debian BTS as report #43119.
  Please CC 43119@bugs.debian.org on replies.
  Log of report can be found at http://bugs.debian.org/43119 ]
	

Markus F.X.J. Oberhumer writes:
 > Package: gcc
 > Version: 2.95.1-0pre1
 > 
 > gcc exits with a "conflicting types" error when
 > compiling the code below.
 > 
 > Markus
 > 
 > int foo1(void) __attribute__((stdcall));
 > int foo1(void)
 > {
 >     return 1;
 > }
 > 
 > int foo2(void) __attribute__((__stdcall__));
 > int foo2(void)
 > {
 >     return 2;
 > }

In the documentation ("Declaring Attributes of Functions"), I find:
"The keyword `__attribute__' allows you to specify special attributes
when making a declaration." However if the attribute is repeated at the
definition of the function, I get an parse error (according to the
documentation):

int foo1(void) __attribute__((stdcall)); 
int foo1(void) __attribute__((stdcall))
{ 
    return 1; 
} 
bug-43119-2.c:3: parse error before `{'

When using the now undocumented way of moving the attribute before the 
function name, neither the parse error nor the type conflict occur:

int foo1(void) __attribute__((stdcall)); 
int __attribute__((stdcall)) foo1(void) 
{ 
    return 1; 
} 
>How-To-Repeat:
	
>Fix:
	
>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: c/6902: stdcall function attribute doesn't work any longer
@ 2002-06-02  0:09 rth
  0 siblings, 0 replies; 2+ messages in thread
From: rth @ 2002-06-02  0:09 UTC (permalink / raw)
  To: 43119, gcc-bugs, gcc-prs, markus.oberhumer, nobody

Synopsis: stdcall function attribute doesn't work any longer

State-Changed-From-To: open->closed
State-Changed-By: rth
State-Changed-When: Sun Jun  2 00:09:14 2002
State-Changed-Why:
    Please re-read http://gcc.gnu.org/onlinedocs/gcc-3.1/gcc/Attribute-Syntax.html#Attribute%20Syntax

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=6902


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-06-02  7:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-06-01 15:06 c/6902: stdcall function attribute doesn't work any longer Matthias Klose
2002-06-02  0:09 rth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).