llvm / llvm/llvm-project

Clang should probably warn if -fassociative-math is set without -fno-signed-zeros

Open
#172,519 1 comment 0 reactions 0 assignees View on GitHub
clang:driver
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

Clang ignores -fno-signed-zeros unless -fno-signed-zeros is also set, for the sake of matching GCC's behavior.
But IMO silently ignoring options is quite bad UX, **especially** since the Clang docs do not mention this requirement.
Therefore Clang should warn about an ineffective -fassociative-math flag on its command line.

Contributor guide

Open the contributing guide

Research direction

No file or test is named. Start by tracing Clang's handling of -fassociative-math and -fno-signed-zeros, then inspect existing command-line diagnostic tests and the relevant documentation. Done means an ineffective -fassociative-math setting produces a warning and the documented requirement is clear.

Written by the indexing model from the issue text.

Assessment

Domain
compilers
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.