Bug 50855 - Bogus warning on weak symbol from g++
Summary: Bogus warning on weak symbol from g++
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
(Show other bugs)
Version: 7.3
Hardware: i386 Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: David Lawrence
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-08-03 22:38 UTC by hjl
Modified: 2007-04-18 16:35 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-08-17 16:49:26 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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 23:22 UTC, hjl
no flags Details | Diff

Description hjl 2001-08-03 22:38:51 UTC
# cat x.c
extern void foo (void) __attribute__ ((weak));

int
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 23:22:51 UTC
Created attachment 26172 [details]
A patch

Comment 2 Jakub Jelinek 2001-08-07 09:41:09 UTC
This will be included in gcc3-3.0-6 and gcc-2.96-96.
Thanks.

Comment 3 Jay Turner 2002-04-02 17:13:31 UTC
Fix confirmed with gcc-2.96-107.


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