On Wed, Dec 9, 2020 at 8:45 PM Jun Aruga <jar...@redhat.com> wrote:
>
> > Hello,
> >
> > I was unable to rebuild in my testing repo:
> >
> > https://copr.fedorainfracloud.org/coprs/build/1818226
> >
> > Tests fail due warnings, when using RBIMPL_CAST:
> >
> > ```
> > /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rbasic.h:40:59:
> >  warning: expression does not compute the number of elements in this array; 
> > element type is 'VALUE' {aka 'long unsigned int'}, not 'char' 
> > [-Wsizeof-array-div]
> >    40 |     RBIMPL_CAST((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / 
> > sizeof(T)))
> > ```
> >
> > I suspect this is new gcc warning. Or should we report this upstream?
>
> Here is the failure of the scratch build on the private-ruby-3.0 branch.
> https://koji.fedoraproject.org/koji/taskinfo?taskID=57140928
> https://kojipkgs.fedoraproject.org//work/tasks/928/57140928/build.log
>
> Yes, I think we should report it. identifying the version of the gcc
> by comparing the build on f33 or f32 or finding and pointing out the
> official document of the new warning.

I investigated more to report it to upstream.
On the rawhide, the gcc version is 11.0.0-0.7.fc34

According to the gcc 11 release note, the new warning
-Wsizeof-array-div causing the error was added.
https://gcc.gnu.org/gcc-11/changes.html

> C family
> New warnings:
> -Wsizeof-array-div, enabled by -Wall, warns about divisions of two sizeof 
> operators when the first one is applied to an array and the divisor does not 
> equal the size of the array element.

Here is the ticket with the examples.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91741

I will report it to the upstream, and let you know the result here.

I am running the SRPM on the private-ruby-3.0 branch for f33 too just in case.

```
$ koji build --scratch --nowait --arch-override=x86_64 f33
ruby-3.0.0-0.1.20201204git1cfc6e7b7a.fc34.src.rpm
https://koji.fedoraproject.org/koji/taskinfo?taskID=57179644
```

-- 
Jun | He - His - Him
_______________________________________________
ruby-sig mailing list -- ruby-sig@lists.fedoraproject.org
To unsubscribe send an email to ruby-sig-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/ruby-sig@lists.fedoraproject.org

Reply via email to