[LLVMbugs] [Bug 7598] New: Spurious error involving enums, conditional expressions, and const return values
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Jul 8 14:07:58 PDT 2010
http://llvm.org/bugs/show_bug.cgi?id=7598
Summary: Spurious error involving enums, conditional
expressions, and const return values
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: matthewbg at google.com
CC: llvmbugs at cs.uiuc.edu
Created an attachment (id=5193)
--> (http://llvm.org/bugs/attachment.cgi?id=5193)
test case
Below, v has type Enum; the return type of g() is 'const Enum', which is a
little suspicious, but not AFAICT illegal.
% clang -fsyntax-only conditional_enum.cc
conditional_enum.cc:10:8: error: cannot initialize a variable of type 'Enum'
with an rvalue of type 'int'
Enum e = false ? g() : v;
^ ~~~~~~~~~~~~~~~
1 error generated.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list