DotGNU Portable.NET - Bugs: bug #7485, Non-initialized variable in...
You are not allowed to post comments on this tracker with your current authentication level.
bug #7485: Non-initialized variable in for-loop shall not be compiled by cscc
Submitter: | None | ||
Submitted: | Wed 28 Jan 2004 01:00:07 AM UTC | ||
Category: | None | Severity: | 3 - Normal |
Item Group: | None | Status: | None |
Privacy: | Public | Assigned to: | None |
Open/Closed: | Open |
Sun 05 Jun 2005 08:25:48 AM UTC, comment #2: |
Deryk Robosson <drobosson> |
Fri 18 Mar 2005 04:11:32 PM UTC, comment #1: Able to reproduce using test case.
|
Deryk Robosson <drobosson> |
Wed 28 Jan 2004 01:00:07 AM UTC, original submission:
Compiling the attached demo file containing a for-loop with a variable, that isn't initialized, stops using Billy's csc with an error message as follows:
|
Anonymous |
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 2 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2005-06-05 | drobosson | Attached File | - | Added testcase.c, #2574 | |
2004-01-28 | None | Attached File | - | Added for_loop_test.cs, #1007 |
Powered by Savane 3.13-758e.
Corresponding source code
Digging a bit further, this doesn't appear to be tied directly to the FOR keyword and related parsing. It can occur elsewhere as well as demonstrated in the attached test case.
ExpressionStatementList->ExpressionStatement->InnerExpressionStatement->AssignmentExpression would be the flow I would expect to happen in this circumstance for the CS case. The first entry for AssignmentExpression is '=' though I can only assume what $1 and $3 should be (variable and value?) as passed to MakeBinary. Klaus suggested during the course of conversation, "the first case in AssignmentExpression should set a kind of flag on the variable that it is initialized".
Rhys, can you offer any ideas or suggestions on this?