Ticket #767 (closed bug: fixed)

Opened 13 years ago

Last modified 12 years ago

imcc allows multiple .locals of the same name

Reported by: cotto Owned by: NotFound
Priority: normal Milestone:
Component: imcc Version: 1.2.0
Severity: medium Keywords:
Cc: Language:
Patch status: new Platform:

Description (last modified by pmichaud) (diff)

A variety of code generating tools (PGE, PCT) like the ability to be able to re-declare an existing symbol (but always with the same type).

Personally, I'd like to see that redeclaring a symbol with the same type is allowed in PIR , but redeclaring with a different type throws an error.

Pm

Attachments

symreg.patch Download (0.8 KB) - added by NotFound 13 years ago.
fail on duplicated local/param identifiers

Change History

  Changed 13 years ago by cotto

  • status changed from new to closed
  • resolution set to wontfix

  Changed 13 years ago by NotFound

  • status changed from closed to reopened
  • resolution wontfix deleted

Not a blocker, but after discussion in irc a test revealed a lot of multiple locals, and locals with the same name as a param, in the current code base. Reopening the ticket.

Changed 13 years ago by NotFound

fail on duplicated local/param identifiers

  Changed 13 years ago by NotFound

  • patch set to new

With this patch I've been able to locate and fix a lot of duplicates in the code base and in tests. But I'm locked with a failed test in t/compilers/pct/complete_workflow.t that I don't know how to fix, or if the issue will impact pct based languages. Thus I don't committed it.

in reply to: ↑ description   Changed 13 years ago by pmichaud

  • description modified (diff)

Replying to cotto:

This ticket comes from RT #37245. Basically, imcc allows the following code to run, which it obviously shouldn't. {{{ .sub foo .local pmc bar .local int bar bar = 2 print bar .end }}} This is a known bug, but because imcc is on the way out it's not worth fixing. This bug isn't currently known to block anything, but it can be reopened if it becomes a blocker.

  Changed 13 years ago by NotFound

I modified the previous patch to catch only the duplications with different type, and found that the previous version only catched the ones with same type, and now catches a few that breaks the build. So I changed it to emit a warning instead of failing, and commited it on r39652 in order to help fixing that problems.

  Changed 13 years ago by NotFound

  • owner set to NotFound
  • status changed from reopened to new

After 1.4 release, and verified that the blockers had been fixed, converted the warning to an error in r40227.

I'll close the ticket in a few days unless unexpected problems appears.

  Changed 12 years ago by NotFound

  • status changed from new to closed
  • resolution set to fixed

No complaints heard, closing ticket.

Note: See TracTickets for help on using tickets.