Project

General

Profile

Actions

Bug #1989

open

signbit macro doesn't compile under gcc -Werror=strict-aliasing -O2

Added by John Firebaugh over 9 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Start date:
2012-01-16
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:

Description

The definition of the signbit macro from math_c99.h uses a type-punned pointer, which breaks strict-aliasing rules and will not compile on gcc with -O2 and the -Werror=strict-aliasing option.

From what I've seen, other implementations type pun via a union instead, which is standards compliant.

Test program: https://gist.github.com/1616683
Downstream issue: https://github.com/rubinius/rubinius/issues/1515

No data to display

Actions

Also available in: Atom PDF