View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000041 | LDMud 3.2-dev | LPC Compiler/Preprocessor | public | 2004-01-02 02:30 | 2004-05-17 07:27 |
Reporter | menaures | Assigned To | |||
Priority | normal | Severity | trivial | Reproducibility | N/A |
Status | closed | Resolution | fixed | ||
Summary | 0000041: typechecking issues | ||||
Description | Have any kind of macro that operates on different data types. How do you compile this in newer 3.2.10-dev drivers without errors and warnings? The only solution I found was turning off warn_empty_casts, because I used (mixed) to overcome the typechecking issues. However, it is sad to have to turn all the empty_casts warnings off, only because I have to use mixed->mixed casts. Maybe there should always be a legitimate way to turn off the drivers typechecking for a local value, for example by always allowing (mixed) (or ({mixed})?) casts on any type. Or is there another solution? Code: ---- 8< ---- #define MACRO(x) (intp(x) && (x) == i || stringp(x) && x == str || objectp(x) && (x) == ob || pointerp(x) && (x) == arr || mappingp(x) && (x) == map /*|| ...*/) void foo() { object ob; int i; string str, * arr; mapping map; /* ... */ mixed x; MACRO(ob); MACRO(i); MACRO(str); MACRO(arr); MACRO(map); MACRO(x); } ---- 8< ---- | ||||
Tags | No tags attached. | ||||
|
Casting a mixed type to 'mixed' no longer produces a warning; this type of cast was never associated with a type conversion anyway. Fixed in 3.2-dev.623 and 3.3.508. |
Date Modified | Username | Field | Change |
---|---|---|---|
2004-01-02 02:30 | menaures | New Issue | |
2004-04-03 15:32 |
|
Status | new => resolved |
2004-04-03 15:32 |
|
Resolution | open => fixed |
2004-04-03 15:32 |
|
Assigned To | => lars |
2004-04-03 15:32 |
|
Note Added: 0000040 | |
2004-05-17 07:27 |
|
Status | resolved => closed |