return map | (1ul<<s->type);
}
-bool cdecl__typemap_is_valid(unsigned long map)
-{
- switch (map) {
-# include "validtypes.h"
- return true;
- }
-
- return false;
-}
-
unsigned long cdecl__build_typemap(struct cdecl_declspec *s)
{
unsigned long map = 0;
map = add_typespec(map, c);
if (map == -1)
- break;
+ return -1;
}
- return map;
+ switch (map) {
+ case 0:
+ fprintf(stderr, "no type specifiers\n");
+ return -1;
+# include "validtypes.h"
+ return map;
+ default:
+ fprintf(stderr, "conflicting type specifiers\n");
+ return -1;
+ }
}