[llvm-bugs] [Bug 31787] New: Incorrect warning about uninitialized variable with `asm`
via llvm-bugs
llvm-bugs at lists.llvm.org
Sat Jan 28 01:56:45 PST 2017
https://llvm.org/bugs/show_bug.cgi?id=31787
Bug ID: 31787
Summary: Incorrect warning about uninitialized variable with
`asm`
Product: clang
Version: 4.0
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: paulepanter at users.sourceforge.net
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
Clang 4.0.0-+rc1 shows a warning, which is – as far as I can see – incorrect.
```
$ clang-4.0 --version
clang version 4.0.0-+rc1-1 (tags/RELEASE_400/rc1)
Target: i686-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
$ git clone https://review.coreboot.org/memtest86plus
$ cd memtest86plus
$ clang-4.0 -c -Wall -march=i486 -m32 -O0 -fomit-frame-pointer -fno-builtin
-ffreestanding -fPIC -fno-stack-protector -fgnu89-inline -fno-strict-aliasing
reloc.c
reloc.c:55:10: warning: variable 'got' is uninitialized when used here
[-Wuninitialized]
return *got;
^~~
reloc.c:54:26: note: initialize the variable 'got' to silence this warning
register Elf32_Addr *got asm ("%ebx");
^
= NULL
1 warning generated.
```
GCC 6.3.0 doesn’t show that warning.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170128/5f48d89b/attachment.html>
More information about the llvm-bugs
mailing list