Opened 16 years ago
Closed 16 years ago
#170 closed enhancement (fixed)
Add sizeof operator to front end
| Reported by: | Stephen Siegel | Owned by: | ywei |
|---|---|---|---|
| Priority: | major | Milestone: | Release 1.0 |
| Component: | front | Version: | 1.0 |
| Keywords: | sizeof size front | Cc: |
Description
Add to front end a new kind of expression
sizeof(type)
where type can be any type, e.g., int***[].
The expression has type int.
Additions must also be made to the model package to support this (separate ticket).
Evaluation: this expression will evaluate to a "special" symbolic constant of integer type. For example, the symbolic constant SIZEOF_INT will be the result of evaluation of sizeof(int).
We might want to insist that all pointer types have the same size, but this is an issue with the semantics of the programming languages that might differ from language to language.
Change History (2)
comment:1 by , 16 years ago
| Status: | new → accepted |
|---|
comment:2 by , 16 years ago
| Resolution: | → fixed |
|---|---|
| Status: | accepted → closed |

Expression added.