Bug 740886 - math.h fails to compile with -std=c99
Summary: math.h fails to compile with -std=c99
Keywords:
Status: CLOSED DUPLICATE of bug 740235
Alias: None
Product: Fedora
Classification: Fedora
Component: glibc
Version: 16
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Andreas Schwab
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-09-23 16:18 UTC by Dominik 'Rathann' Mierzejewski
Modified: 2016-11-24 15:49 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-09-23 19:47:16 UTC


Attachments (Terms of Use)

Description Dominik 'Rathann' Mierzejewski 2011-09-23 16:18:06 UTC
Description of problem:
Any code using math.h fails to compile if -std=c99 is specified in CFLAGS at -O1 or higher.

Version-Release number of selected component (if applicable):
glibc-headers-2.14.90-9.x86_64

How reproducible:
Always.

Steps to Reproduce:
1. cat > test.c
#include <math.h>
float foo(float f) { return lrintf(f); }
int main(void){ return 0; }

2. gcc -std=c99 -O1 -o test.o -c test.c 
  
Actual results:
In file included from /usr/include/math.h:416:0,
                 from test.c:1:
/usr/include/bits/mathinline.h: In function 'lrintf':
/usr/include/bits/mathinline.h:76:26: error: expected ')' before ':' token
/usr/include/bits/mathinline.h: In function 'lrint':
/usr/include/bits/mathinline.h:85:26: error: expected ')' before ':' token
/usr/include/bits/mathinline.h: In function 'llrintf':
/usr/include/bits/mathinline.h:94:26: error: expected ')' before ':' token
/usr/include/bits/mathinline.h: In function 'llrint':
/usr/include/bits/mathinline.h:101:26: error: expected ')' before ':' token

Expected results:
Code using math.h should compile fine even if using -std=c99.

Comment 1 Dominik 'Rathann' Mierzejewski 2011-09-23 19:47:16 UTC

*** This bug has been marked as a duplicate of bug 740235 ***


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