[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/24064] New: bfd/warning.m4 warning detection broken when !
From: |
andrew at ishiboo dot com |
Subject: |
[Bug binutils/24064] New: bfd/warning.m4 warning detection broken when !defined(__GNUC__) |
Date: |
Fri, 04 Jan 2019 17:05:20 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=24064
Bug ID: 24064
Summary: bfd/warning.m4 warning detection broken when
!defined(__GNUC__)
Product: binutils
Version: 2.32 (HEAD)
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: binutils
Assignee: unassigned at sourceware dot org
Reporter: andrew at ishiboo dot com
Target Milestone: ---
Created attachment 11511
--> https://sourceware.org/bugzilla/attachment.cgi?id=11511&action=edit
Adjust bfd/warning.m4 egrep patterns
`bfd/warning.m4` performs `egrep` checks against the preprocessor output of
`__GNUC__`:
> # Set WARN_WRITE_STRINGS if the compiler supports -Wwrite-strings.
> WARN_WRITE_STRINGS=""
> AC_EGREP_CPP([^[0-3]$],[__GNUC__],,WARN_WRITE_STRINGS="-Wwrite-strings")
This will incorrectly enable `-Wwrite-strings` if a non-GNU compiler is being
used and `__GNUC__` is not defined by the preprocessor.
The pattern for these checks needs to be adjusted to also treat `__GNUC__` in
the output as "unsupported".
This breaks when Oracle Studio compiler is used, as `-W` is not a warning
switch, and it errors:
> $ cc -Wwrite-strings
> cc: -W option with unknown program write-strings
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug binutils/24064] New: bfd/warning.m4 warning detection broken when !defined(__GNUC__),
andrew at ishiboo dot com <=