Bug 1387415

Summary: glibc: iszero macro defined in <math.h> breaks existing code
Product: [Fedora] Fedora Reporter: Paulo Andrade <paulo.cesar.pereira.de.andrade>
Component: glibcAssignee: Florian Weimer <fweimer>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: arjun.is, codonell, davejohansen, dj, fweimer, jakub, jwakely, law, mfabian, mpolacek, pfrankli, siddhesh
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: glibc-2.24.90-12.fc26 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-10-20 20:21:36 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1384001    

Description Paulo Andrade 2016-10-20 20:11:50 UTC
$ rpm -q glibc cpp
glibc-2.24.90-11.fc26.x86_64
cpp-6.2.1-2.fc26.x86_64

$ cat t.cc
#include <math.h>
int iszero();

$ cpp t.cc | tail -5
int 
# 2 "t.cc" 3 4
   (((__typeof ()) ()) == 0)
# 2 "t.cc"
           ;

A few other macros appear to get expanded as well.

Comment 1 Florian Weimer 2016-10-20 20:21:36 UTC
This is an intentional upstream change.  It does not seem wise to deviate from upstream, even if the change causes compatibility issues.

I have already raised my concerns upstream, independently of this bug.  We will have to wait and see what happens.

Comment 2 Florian Weimer 2016-10-21 13:44:03 UTC
Patch posted upstream:

  https://sourceware.org/ml/libc-alpha/2016-10/msg00353.html

Comment 3 Florian Weimer 2016-10-21 16:39:51 UTC
The upstream fix will be picked up by the next rawhide import.