Bug 176461

Summary: Mismatch in decl of posix_memalign()
Product: [Fedora] Fedora Reporter: Darren Frith <darrenf>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 4   
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: 4.1.0-0.13 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-01-07 17:09:54 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Darren Frith 2005-12-23 03:20:05 UTC
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 17:09:54 UTC
Should be fixed in gcc-4.1.0-0.13.