http://llvm.org/bugs/show_bug.cgi?id=7337
Summary: -Wunused-parameter
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
compiling unused_parameter_ifdef.cc (see below) with
clang -Wunused-parameter unused_parameter_ifdef.cc
produces the following warning:
unused_parameter_ifdef.cc:3:14: warning: unused parameter 'x'
[-Wunused-paramet\
er]
int a( int x ){
^
1 warning generated.
This warning should not appear as x will be used if the #ifdef USE_PARAMETER is
set.
-------------------------------------------------
file unused_parameter_ifdef.cc:
-------------------------------------------------
class abc {
int a( int x ){
#ifdef USE_PARAMETER
return x;
#else
return 0;
#endif
}
};
int main(int, char **){ return 0;}
--------------------------------------------------
$ clang -v
clang version 2.0 (trunk 105679)
Target: x86_64-unknown-linux-gnu
Thread model: posix
$ uname -a
Linux xxxxxxxx 2.6.32-22-generic #36-Ubuntu SMP Thu Jun 3 19:31:57 UTC 2010
x86_64 GNU/Linux
--
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs