[C++ Patch] Fix grokbitfield location
Wed Dec 5 22:52:00 GMT 2018
On 12/5/18 5:34 PM, Paolo Carlini wrote:
> On 05/12/18 20:31, Jason Merrill wrote:
>> On 12/5/18 7:45 AM, Paolo Carlini wrote:
>>> as mentioned in one of my last patches, we can now improve this
>>> location. Note: in the same function there are a few further issues
>>> which I mean to incrementally fix (eg, the diagnostics for
>>> warn_if_not_aligned ICEs for unnamed bit-fields). Tested x86_64-linux.
>> As long as we're messing with this diagnostic, let's also print the
>> type in question.
> Agreed. Thus I tested on x86_64-linux the below.
> Thanks, Paolo.
> - if (!INTEGRAL_OR_ENUMERATION_TYPE_P (TREE_TYPE (value))
> - && (INDIRECT_TYPE_P (value)
> - || !dependent_type_p (TREE_TYPE (value))))
> + if (!INTEGRAL_OR_ENUMERATION_TYPE_P (type)
> + && (INDIRECT_TYPE_P (value) || !dependent_type_p (type)))
Hmm, surely this should be INDIRECT_TYPE_P (type). OK with that change.
More information about the Gcc-patches