Skip to content

Include <limits> in Yarr.h to fix build with GCC 11

Albert Astals Cid requested to merge aacid/qtdeclarative:limits_include into kde/5.15
  • <limits.h> (aka ) is needed for UINT_MAX macro constant.
  • is needed for std::numeric_limits.
Without this fix, qtdeclarative failed to build on some platforms:

 In file included from jsruntime/qv4regexp_p.h:62,
                  from jsruntime/qv4regexp.cpp:40:
 ../3rdparty/masm/yarr/Yarr.h:46:44: error: ‘numeric_limits’ is not a member of ‘std’
    46 | static const unsigned offsetNoMatch = std::numeric_limits<unsigned>::max();
       |                                            ^~~~~~~~~~~~~~

Pick-to: 5.15 6.2
Change-Id: I7cc9f7bc6624a52c8659f09034ab16064da5fd2f
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>

(cherry picked from commit db58b851)

Merge request reports