Building chromium on openSUSE delivers ../../base/containers/intrusive_heap.h:152:36: error: enumerator value '-1' is outside the range of underlying type 'size_t' {aka 'long unsigned int'}

13 views
Skip to first unread message

Raymond W

unread,
Sep 9, 2019, 12:40:55 PM9/9/19
to chromium-packagers
Hi,

The last two DEV tarballs are ending up with the indicated error. It appeared in the added functionality base/containers/intrusive_heap.h. The corresponding code is 

class BASE_EXPORT HeapHandle {
 public:
  enum : size_t { kInvalidIndex = -1 };


The error generated is :

[  375s] In file included from ../../base/task/common/intrusive_heap.h:8,
[  375s]                  from ../../base/task/thread_pool/task_source.h:17,
[  375s]                  from ../../base/task/thread_pool/task_tracker.h:27,
[  375s]                  from ./../../base/task/thread_pool/service_thread.cc:14,
[  375s]                  from gen/base/base_jumbo_28.cc:5:
[  375s] ../../base/containers/intrusive_heap.h:152:36: error: enumerator value '-1' is outside the range of underlying type 'size_t' {aka 'long unsigned int'}
[  375s]   152 |   enum : size_t { kInvalidIndex = -1 };
[  375s]       |    

Strangely this error is not generated on Gentoo, who builds with a similar setup and equal GN flags. So I am wondering if this is a GCC flag that is switched on for openSUSE or something else. Nevertheless I believe that assigning an signed value to a unsigned integer is wrong in the first place. 

Regards

Raymond

Raymond W

unread,
Sep 9, 2019, 3:15:32 PM9/9/19
to Tom Anderson, chromium-packagers
Hi Tom,

Thanks for the patch. I added it to the build and there is no more
error generated for this file.

Regards

Raymond

On Mon, Sep 9, 2019 at 8:29 PM Tom Anderson <thomasa...@google.com> wrote:
>
> Hopefully this should fix it:
> https://chromium-review.googlesource.com/c/chromium/src/+/1792763/
>> --
>> You received this message because you are subscribed to the Google Groups "chromium-packagers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an email to chromium-packag...@chromium.org.
>> To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-packagers/7a2234e5-c6f7-4733-9fb4-ad7de8476fb1%40chromium.org.
Reply all
Reply to author
Forward
0 new messages