Bug 176461 - Mismatch in decl of posix_memalign()
Mismatch in decl of posix_memalign()
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: gcc (Show other bugs)
4
x86_64 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-12-22 22:20 EST by Darren Frith
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version: 4.1.0-0.13
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-01-07 12:09:54 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Darren Frith 2005-12-22 22:20:05 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.12) Gecko/20050923 Fedora/1.7.12-1.5.1

Description of problem:
/usr/lib/gcc/x86_64-redhat-linux/4.0.2/include/mm_malloc.h defines posix_memalign() thus:

extern int posix_memalign (void **, size_t, size_t);

but /usr/include/stdlib (from glibc-headers-2.3.5-10.3) defines it thus:

/* Allocate memory of SIZE bytes with an alignment of ALIGNMENT.  */
extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size)
     __THROW __nonnull ((1)) __wur;

The mismatch in prototypes causes gcc to generate the following error:

/usr/lib/gcc/x86_64-redhat-linux/4.0.2/include/mm_malloc.h:34: error: declaration of 'int posix_memalign(void**, size_t, size_t)' throws different exceptions
/usr/include/stdlib.h:621: error: than previous declaration 'int posix_memalign(void**, size_t, size_t) throw ()'



Version-Release number of selected component (if applicable):
gcc-4.0.2-8.fc4

How reproducible:
Always

Steps to Reproduce:
1. g++
2.
3.
  

Actual Results:  declaration of 'int posix_memalign(void**, size_t, size_t)' throws different exceptions
/usr/include/stdlib.h:621: error: than previous declaration 'int posix_memalign(void**, size_t, size_t) throw ()'

Expected Results:  No error

Additional info:
Comment 2 Jakub Jelinek 2006-01-07 12:09:54 EST
Should be fixed in gcc-4.1.0-0.13.

Note You need to log in before you can comment on or make changes to this bug.