[prev in list] [next in list] [prev in thread] [next in thread]
List: llvm-bugs
Subject: [LLVMbugs] [Bug 657] NEW: [llvm-gcc] Spurious "warning: function
From: bugzilla-daemon () cs ! uiuc ! edu
Date: 2005-11-09 8:10:23
Message-ID: 200511090810.CAA06157 () zion ! cs ! uiuc ! edu
[Download RAW message or body]
http://llvm.cs.uiuc.edu/bugs/show_bug.cgi?id=657
Summary: [llvm-gcc] Spurious "warning: function returns address
of local variable"
Product: tools
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: minor
Priority: P2
Component: llvm-gcc
AssignedTo: unassignedbugs@nondot.org
ReportedBy: kharriman@greenplum.com
llvm-gcc incorrectly gives a warning...
llvm-gcc -o llvmbug05.bc -c -save-temps llvmbug05.c
llvmbug05.c: In function `f':
llvmbug05.c:7: warning: function returns address of local variable
... when compiling this ...
# 1 "llvmbug05.c"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "llvmbug05.c"
char*
f(char *buf)
{
char* tbuf = buf;
if (*tbuf)
return tbuf + 1;
return 0;
}
The generated bytecode looks ok though.
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic