View Issue Details

IDProjectCategoryView StatusLast Update
0000041LDMud 3.2-devLPC Compiler/Preprocessorpublic2004-05-17 09:27
Reportermenaures Assigned Tolars 
Status closedResolutionfixed 
Summary0000041: typechecking issues
DescriptionHave 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?

---- 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;

---- 8< ----
TagsNo tags attached.



2004-04-03 17:32

reporter   ~0000040

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.

Issue History

Date Modified Username Field Change
2004-01-02 03:30 menaures New Issue
2004-04-03 17:32 lars Status new => resolved
2004-04-03 17:32 lars Resolution open => fixed
2004-04-03 17:32 lars Assigned To => lars
2004-04-03 17:32 lars Note Added: 0000040
2004-05-17 09:27 lars Status resolved => closed