Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 50855 - Bogus warning on weak symbol from g++
Bogus warning on weak symbol from g++
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2001-08-03 18:38 EDT by hjl
Modified: 2007-04-18 12:35 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-08-17 12:49:26 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
A patch (569 bytes, patch)
2001-08-03 19:22 EDT, hjl
no flags Details | Diff

  None (edit)
Description hjl 2001-08-03 18:38:51 EDT
# cat x.c
extern void foo (void) __attribute__ ((weak));

main ()
  if (&foo)
    foo ();

  return 0;
# g++ -S -O -Wall x.c
x.c: In function `int main ()':
x.c:6: warning: the address of `foo ()', will always be `true'

gcc is ok. gcc 3.0 has the same bug.
Comment 1 hjl 2001-08-03 19:22:51 EDT
Created attachment 26172 [details]
A patch
Comment 2 Jakub Jelinek 2001-08-07 05:41:09 EDT
This will be included in gcc3-3.0-6 and gcc-2.96-96.
Comment 3 Jay Turner 2002-04-02 12:13:31 EST
Fix confirmed with gcc-2.96-107.

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