Skip to content

type-limits check prevents compiling 4.2 version by GCC 11 #1322

@grabusr

Description

@grabusr

Godot version

4.2

godot-cpp version

4.2-stable

System information

Ubuntu 22.04.3 LTS, gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0

Issue description

Compilation error is raised:

godot-cpp/src/godot.cpp:274:60: error: comparison of unsigned expression in ‘>= 0’ is always true [-Werror=type-limits]
  274 |                 compatible = internal::godot_version.patch >= GODOT_VERSION_PATCH;

Reason of that is we compare uint32_t patch variable with GODOT_VERSION_PATCH, which value is 0.

Steps to reproduce

Just try to compile tag godot-4.2-stable with gcc-11.4 in Release config

Minimal reproduction project

Just try to compile tag godot-4.2-stable with gcc-11.4 in Release config

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis has been identified as a bugtopic:buildsystemRelated to the buildsystem or CI setup

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions