Modify

Ticket #244 (new defect)

Opened 8 years ago

Access restrictions for "const" variables are too tight

Reported by: hauma Owned by: hauma
Priority: normal Milestone: JPlater
Component: JP trafo Version: 1.07i
Severity: normal Keywords:
Cc:

Description

In ticket:118, replicated static constants of remote classes were introduced. To enable constants of array type, the unused "const" modifier was re-introduced to declare the whole (multi-dimensional) array to be constant. Access to arrays declared "const" is restricted to ensure that their values cannot be modified outside the static initializer. These restrictions completely forbid creating alias references to const arrays. This restriction is too tight. Instead, the const modifier should be usable for local variables as well. Aliasing a constant static array as local const variable is OK, since the compiler can track the further usage of such local variables and prevent modifications of them.

Attachments

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as new
as The resolution will be set. Next status will be 'closed'
to The owner will be changed from hauma. Next status will be 'new'
The owner will be changed from hauma to anonymous. Next status will be 'assigned'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.