Bug 5334 - hpd: Size of constant expressions are hard-coded
Summary: hpd: Size of constant expressions are hard-coded
Status: RESOLVED FIXED
Alias: None
Product: frysk
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Unassigned
URL:
Keywords:
Depends on:
Blocks: 2246
  Show dependency treegraph
 
Reported: 2007-11-15 18:25 UTC by Teresa Thomas
Modified: 2007-11-20 16:07 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Teresa Thomas 2007-11-15 18:25:38 UTC
Constants created in CExprEvaluator using hardcoded types. Hence their (type)
sizes not consistent with machine.

bash-3.2$ uname -p
i686

---
(fhpd) print sizeof 1
[0.0]
8
---

Expected size of long: 4
Comment 1 Teresa Thomas 2007-11-20 16:07:39 UTC
Marking fixed for now. In the future, ExprSymTab/Config may be required to
provide other type sizes as well.

Commit:

Use word size of machine to create long type, instead of hard coded size of 8 bytes.
    
    frysk-core/frysk/expr/ChangeLog
    2007-11-20  Teresa Thomas  <tthomas@redhat.com>
    
    	* CExprEvaluator.g: Use word size of machine to
    	create long type.
    	* TestbedSymTab.java (getWordSize): Return machine
    	word size.