[LLVMbugs] [Bug 4885] New: Warnings from compiling llvm with icc
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Fri Sep 4 07:50:50 PDT 2009
http://llvm.org/bugs/show_bug.cgi?id=4885
Summary: Warnings from compiling llvm with icc
Product: libraries
Version: trunk
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Core LLVM classes
AssignedTo: unassignedbugs at nondot.org
ReportedBy: idadesub at users.sourceforge.net
CC: llvmbugs at cs.uiuc.edu
This bug is to track fixing the icc warnings. I'll be putting together a patch
to fix these. Here are the current ones:
-----------------------
/scratch/llvm/llvm/lib/Support/regcomp.c(259): warning #592: variable
"prevback" is used before its value is set
sopno prevback = prevback;
^
-----------------------
/scratch/llvm/llvm/lib/Target/ARM/ARMJITInfo.cpp(202): warning #69: integer
conversion resulted in truncation
JCE.emitWordLE((intptr_t)ARMCompilationCallback);
-----------------------
http://software.intel.com/en-us/articles/cdiag111/
/scratch/llvm/llvm/lib/System/Mutex.cpp(119): remark #111: statement is
unreachable
return false;
^
Not sure what to do about this one, it looks like icc is inlining the
"pthread_enabled", and then seeing that there's no possible way to reach the
"return false" in:
bool
MutexImpl::release()
{
if (pthread_enabled)
{
pthread_mutex_t* mutex = static_cast<pthread_mutex_t*>(data_);
assert(mutex != 0);
int errorcode = pthread_mutex_unlock(mutex);
return errorcode == 0;
}
return false;
}
-----------------------
/scratch/llvm/llvm/include/llvm/Support/Registry.h(80): warning #1170: invalid
redeclaration of nested class
class iterator;
^
This one's a simple fix, "class iterator" is listed twice.
-----------------------
http://software.intel.com/en-us/articles/cdiag1418/
/scratch/llvm/llvm/include/llvm/Support/CommandLine.h(307): remark #1418:
external function definition with no prior declaration
LocationClass<Ty> location(Ty &L) { return LocationClass<Ty>(L); }
this one is happening because the warning level is high enough to give
stylistic suggestions. This one is saying that you should declare functions
before implementing them, even if they're in a .h file.
-----------------------
http://software.intel.com/en-us/articles/cdiag1419/
/scratch/llvm/llvm/lib/Support/Timer.cpp(26): remark #1419: external
declaration in primary source file
namespace llvm { extern raw_ostream *GetLibSupportInfoOutputFile(); }
^
-----------------------
http://software.intel.com/en-us/articles/cdiag1572/
/scratch/llvm/llvm/lib/Support/Timer.cpp(291): remark #1572: floating-point
equality and inequality comparisons are unreliable
if (Total.UserTime)
^
For Timer.cpp, I could replace these with "if (Total.UserTime > 0)", but that
reads weird to me. There are a lot of these warnings though.
-----------------------
http://software.intel.com/en-us/articles/cdiag177/
/scratch/llvm/llvm/lib/System/DynamicLibrary.cpp(33): remark #177: variable
"Dummy" was declared but never referenced
} Dummy;
^
This is an easy fix, since this is a c++ file and doesn't need the trailing
name for the struct.
http://software.intel.com/en-us/articles/cdiag177/
/scratch/llvm/llvm/lib/Support/APInt.cpp(1484): remark #177: variable "allOnes"
was declared but never referenced
APInt allOnes = APInt::getAllOnesValue(d.getBitWidth());
^
/scratch/llvm/llvm/lib/Support/APInt.cpp(1486): remark #177: variable
"signedMax" was declared but never referenced
APInt signedMax = APInt::getSignedMaxValue(d.getBitWidth());
/scratch/llvm/llvm/utils/TableGen/FastISelEmitter.cpp(219): warning #177:
function "<unnamed>::FastISelMap::PrintClass" was declared but never referenced
void PrintClass(raw_ostream &OS);
^
/scratch/llvm/llvm/lib/VMCore/AsmWriter.cpp(1285): warning #177: function
"<unnamed>::AssemblyWriter::getModule" was declared but never referenced
const Module* getModule() { return TheModule; }
^
Also simple fixes.
-----------------------
http://software.intel.com/en-us/articles/cdiag1599/
/scratch/llvm/llvm/lib/Transforms/IPO/PruneEH.cpp(111): remark #1599:
declaration hides variable "E" (declared at line 100)
for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E;
++I)
We're getting a lot of these errors.
-----------------------
http://software.intel.com/en-us/articles/cdiag1128/
/scratch/llvm/llvm/lib/System/DynamicLibrary.cpp(28): warning #1128: a storage
class may not be specified here
static struct ExplicitSymbolsDeleter {
^
Does this do anything? If not, I'll remove it.
-----------------------
http://software.intel.com/en-us/articles/cdiag1128/
/scratch/llvm/llvm/lib/System/Unix/Signals.inc(229): remark #181: argument is
incompatible with corresponding format string conversion
fprintf(stderr, " + %tu",(char*)StackTrace[i]-(char*)dlinfo.dli_saddr);
-----------------------
I'll post more in a bit.
--
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