[Bug ipa/85617] New: Wunused-but-set-variable does not analyze variables passed to functions
danielgutson at gmail dot com
gcc-bugzilla@gcc.gnu.org
Wed May 2 18:59:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85617
Bug ID: 85617
Summary: Wunused-but-set-variable does not analyze variables
passed to functions
Product: gcc
Version: 8.1.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: ipa
Assignee: unassigned at gcc dot gnu.org
Reporter: danielgutson at gmail dot com
CC: marxin at gcc dot gnu.org
Target Milestone: ---
The following code
void f(int& x)
{
x = 1;
}
int main()
{
int a;
f(a);
//a = 1;
}
should warn about 'a' assigned but never used in main. Shouldn't be this helped
by IPA?
More information about the Gcc-bugs
mailing list