Bug 14263 - »val« may be used uninitialized in this function tc-arm.c parse_operands()
Summary: »val« may be used uninitialized in this function tc-arm.c parse_operands()
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: gas (show other bugs)
Version: 2.22
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-18 21:30 UTC by Michael Bruck
Modified: 2012-06-29 15:16 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments
Initialise val (303 bytes, patch)
2012-06-28 15:50 UTC, Nick Clifton
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Bruck 2012-06-18 21:30:59 UTC
building binutils 2.22.52 on cygwin with gcc 4.5.3 and -O6:

gcc -DHAVE_CONFIG_H -I. -I../../../src/binutils-2.22.52/gas  -I. -I../../../src/binutils-2.22.52/gas -I../bfd -I../../../src/binutils-2.22.52/gas/config  -I../../../src/binutils-2.22.52/gas/../include -I../../../src/binutils-2.22.52/gas/.. -I../../../src/binutils-2.22.52/gas/../bfd   -DLOCALEDIR="\"/cygdrive/p/Ablage/DG-GCC/install/share/locale\""  -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -O6 -MT tc-arm.o -MD -MP -MF .deps/tc-arm.Tpo -c -o tc-arm.o `test -f 'config/tc-arm.c' || echo '../../../src/binutils-2.22.52/gas/'`config/tc-arm.c
cc1: warnings being treated as errors
../../../src/binutils-2.22.52/gas/config/tc-arm.c: In Funktion »parse_operands«:
../../../src/binutils-2.22.52/gas/config/tc-arm.c:6205:10: Fehler: »val« may be used uninitialized in this function
Comment 1 Nick Clifton 2012-06-28 15:50:06 UTC
Created attachment 6492 [details]
Initialise val
Comment 2 Nick Clifton 2012-06-28 15:52:58 UTC
Hi Michael,

  I am unable to reproduce this problem locally, but the fix seems obvious.  Please could you confirm that the uploaded patch allows you to build the toolchain and if it does then I will check it in.

Cheers
  Nick
Comment 3 Michael Bruck 2012-06-29 15:00:39 UTC
(In reply to comment #2)
> Hi Michael,
> 
>   I am unable to reproduce this problem locally, but the fix seems obvious. 
> Please could you confirm that the uploaded patch allows you to build the
> toolchain and if it does then I will check it in.
> 
> Cheers
>   Nick

Yes, this fixes it. (Same change I made to get around it.)
Comment 4 Sourceware Commits 2012-06-29 15:15:53 UTC
CVSROOT:	/cvs/src
Module name:	src
Changes by:	nickc@sourceware.org	2012-06-29 15:15:48

Modified files:
	gas            : ChangeLog 
	gas/config     : tc-arm.c 

Log message:
	PR gas/14263
	* config/tc-arm.c (parse_operands): Initialise val.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gas/ChangeLog.diff?cvsroot=src&r1=1.4759&r2=1.4760
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gas/config/tc-arm.c.diff?cvsroot=src&r1=1.521&r2=1.522
Comment 5 Nick Clifton 2012-06-29 15:16:39 UTC
Patch applied.