FS#24355 - [gcc 4.6.0-5] [-Wunused-but-set-variable]

Attached to Project: Arch Linux
Opened by synflag (synflag) - Friday, 20 May 2011, 06:26 GMT
Last edited by Andreas Radke (AndyRTR) - Friday, 20 May 2011, 08:22 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Allan McRae (Allan)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

gcc 4.6.0-5 not finish compile a vanilla kernel with steps:

make menuconfig (previous .config from slackware 13.37 with gcc 4.5.2 and work fine)
make bzImage - Fail at finish time with various errors

I see an error in debian bug list, and the _same_ error i can reproduce in x86 and x86_64 system ArchLinux (have 1 notebook and 1 desktop)

Test it:

test.c:
----------------------------------------------------------
#include <stdio.h>

int main(void)
{
int x;
x = printf("hello, world\n");
return 0;
}
-----------------------------------------------------------
gcc -Wall -Werror test.c; echo $?

test.c: En la función ‘main’:
test.c:5:13: error: se define la variable ‘x’ pero no se usa [-Werror=unused-but-set-variable]
cc1: todos los avisos se tratan como errores

1

------------------------------------------------------------

gcc -Werror=unused-but-set-variable test.c; echo $?

test.c: En la función ‘main’:
test.c:5:13: error: se define la variable ‘x’ pero no se usa [-Werror=unused-but-set-variable]
cc1: algunos avisos se tratan como errores

1
-------------------------------------------------------------
gcc -Werror=unused-but-set-variable test.c; echo $?

test.c: En la función ‘main’:
test.c:5:13: error: se define la variable ‘x’ pero no se usa [-Werror=unused-but-set-variable]
cc1: algunos avisos se tratan como errores

1
--------------------------------------------------------------

The same problem is reported in debian, reference:

http://lists.debian.org/debian-gcc/2011/02/msg00107.html


Additional info:
* package version(s)
* config and/or log files etc.
System up to date, archlinux_x86 stable and archlinux_x86_64 stable, the same error. Using xfce or kde in both machines.

note: if you need me to translate the texts in Spanish just ask him

Steps to reproduce:
This task depends upon

Closed by  Andreas Radke (AndyRTR)
Friday, 20 May 2011, 08:22 GMT
Reason for closing:  Not a bug
Additional comments about closing:  The kernel does compile with our safe preset flags in makepkg.conf. Using custom flags is your fun (probably has to be fixed in the kernel code).
Comment by Jelle van der Waa (jelly) - Friday, 20 May 2011, 08:01 GMT
could you please attach the output to the bug report and use LANG=C your command
http://allanmcrae.com/2011/05/how-to-file-a-bug-report/

Loading...