It seems like for most of the declspecs, having both the location and a
flag/count is unnecessary; instead of checking the flag, we can check
whether the location is set. That won't work for the "long long long"
check, but it should work for the others. You'll need to change
_check_decl_spec to take the new declspec and location rather than have
it iterate every time, but that seems worth doing anyway.
So I don't think we need both cp_decl_spec and cp_decl_spec_word.
error_at (location, "%<__thread%> before %qD", ridpointers[keyword]);
decl_specs->specs[(int) ds_thread] = 0;
+ decl_specs->locations[cpdw_thread] = location;
This error should use the stored __thread location, and then set it to 0
rather than the location argument.
+ decl_specs->locations[cpdw_builtin_type_spec] = location;
if (!decl_specs->type)
{
decl_specs->type = type_spec;
decl_specs->type_definition_p = false;
- decl_specs->type_location = location;
+ decl_specs->locations[cpdw_type_spec] = location;
Why do we need cpdw_builtin_type_spec?
Jason