Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000138 [cparser] warnings feature N/A 2014-02-25 00:12 2016-01-03 03:28
Reporter Matze View Status public  
Assigned To
Priority normal Resolution fixed  
Status closed   Product Version
Summary 0000138: Warn about implicit conversion from 1 enum type to another enum type
Description Example:
enum Foo { FOO_A }; enum Bar { BAR_A };
void print_foo(enum Foo f);
int main(void) {
   // should warn here
    print_foo(BAR_A);
}

make sure it also works for bitfields with enum base types (that is used a few times in libfirm if the compiler supports it).

Look at clang for inspiration (and warning switch name -Wenum-conversion), gcc doesn't appear to have this warning.
Additional Information
Tags No tags attached.
Attached Files

- Relationships

-  Notes
(0000211)
Matze (administrator)
2014-03-20 21:44

Implemented in 31f814aab4b0e16e32f0ad9967987e3d315a6b16

- Issue History
Date Modified Username Field Change
2014-02-25 00:12 Matze New Issue
2014-02-25 00:13 Matze Description Updated
2014-02-25 00:13 Matze Description Updated
2014-03-20 21:44 Matze Note Added: 0000211
2014-03-20 21:44 Matze Status new => resolved
2014-03-20 21:44 Matze Resolution open => fixed
2016-01-03 03:28 Matze Status resolved => closed


Mantis 1.1.5[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker