On 12/11/20 2:02 AM, Richard Biener wrote:
> This adds __attribute__((g_nonstandard_bool(precision))) to be able
> to construct nonstandard boolean types which for the included testcase
> is needed to simulate Ada and LTO interaction (Ada uses a 8 bit
> precision boolean_type_node).  This will also be useful for vector
> unit testcases where we need to produce vector types with
> non-standard boolean type components.
>
> --
>
> Joseph, is using attributes a good enough way to extend the set of C
> types for use of the GIMPLE FE?  I chose to add a g_ prefix to
> note use by the GIMPLE FE but since we can mix C and GIMPLE FE
> functions in one TU those of course can leak into C functions
> (and eventually lead to ICEs/issues there) - but the attribute is
> simply ignored when not compiling with -fgimple.
>
> I figured there's no documentation about GIMPLE FE "extensions",
> I'll see to write something as followup (there's a small section
> in sourcebuild.texi and the -fgimple docs itself).  I chose to
> not document this attribute in the place we document attributes
> supposed to be used in production.
>
> OK for trunk?
>
> I'll push the actual vectorizer fix for PR95582 separately, this
> patch is only "needed" to add a testcase for the PR.
>
> Thanks,
> Richard.
>
> 2020-12-11  Richard Biener  <rguent...@suse.de>
>
>       PR tree-optimization/95582
> gcc/c-family/
>       * c-attribs.c (c_common_attribute_table): Add entry for
>       g_nonstandard_bool.
>       (handle_g_nonstandard_bool_attribute): New.
>
> gcc/testsuite/
>       * gcc.dg/pr95582.c: New testcase.
Looks reasonable to me -- the only place we might consider documenting
this would be in sourcebuild.texi as you mentioned since other
developers might want to do something similar.  I don't think we need
user level docs for this.

jeff

Reply via email to