[PATCH v2] Skip VLA structure field tests when compiling with clang

Gary Benson gbenson@redhat.com
Fri Jul 10 12:00:19 GMT 2020


Luis Machado wrote:
> Hi Gary,
> 
> On 7/8/20 12:46 PM, Gary Benson wrote:
> > Hi Luis,
> > 
> > Luis Machado wrote:
> > > As a general comment (for this and other patches like this), I
> > > think the preprocessor blocks intermixed with the test code make
> > > it harder to follow and update the test.
> > > 
> > > If clang claims it will never support a particular feature, then
> > > maybe we should ... separate the bits clang doesn't support and
> > > put it into a separate test that clang-compiled hosts should
> > > skip?
> > 
> > Thanks for the review.  I've made that change, the updated patch
> > is below.  I checked it on Fedora 31 x86_64, GCC and clang.  Is it
> > ok to commit?
> 
> Thanks. That looks cleaner. Just a gotcha below...
> 
[snip]
> > +
> > +# Clang says it will never support variable length arrays in structures.
> > +if {[test_compiler_info clang*]} {
> > +    unsupported "compiler does not variable length arrays in structure"
> 
>                                       ^^^ support?
> 
> Otherwise this looks good to me. Can't approve a commit though.

Good catch.  Thanks for your review, I've fixed this in my tree.

Cheers,
Gary

-- 
Gary Benson - he / him / his
Principal Software Engineer, Red Hat



More information about the Gdb-patches mailing list