Skip to content

GCC 15 compile issue with included scintilla #752

@h3o66

Description

@h3o66

With the 2 latest releases , 0.10 and 0.11 the compile fails with GCC 15 on Fedora 42 .

Build error:

In file included from ../../src/scintilla/qt/ScintillaEdit/ScintillaDocument.cpp:13:
../../src/scintilla/include/ScintillaTypes.h:699:18: error: ‘intptr_t’ does not name a type
  699 | using Position = intptr_t;
      |                  ^~~~~~~~
../../src/scintilla/include/ScintillaTypes.h:1:1: note: ‘intptr_t’ is defined in header ‘<cstdint>’; this is probably fixable by adding ‘#include <cstdint>’
  +++ |+#include <cstdint>
    1 | // Scintilla source code edit control
../../src/scintilla/include/ScintillaTypes.h:700:14: error: ‘intptr_t’ does not name a type
  700 | using Line = intptr_t;
      |              ^~~~~~~~
../../src/scintilla/include/ScintillaTypes.h:700:14: note: ‘intptr_t’ is defined in header ‘<cstdint>’; this is probably fixable by adding ‘#include <cstdint>’
../../src/scintilla/include/ScintillaTypes.h:703:16: error: ‘uintptr_t’ does not name a type
  703 | using uptr_t = uintptr_t;
      |                ^~~~~~~~~
../../src/scintilla/include/ScintillaTypes.h:703:16: note: ‘uintptr_t’ is defined in header ‘<cstdint>’; this is probably fixable by adding ‘#include <cstdint>’
../../src/scintilla/include/ScintillaTypes.h:704:16: error: ‘intptr_t’ does not name a type
  704 | using sptr_t = intptr_t;
      |                ^~~~~~~~
../../src/scintilla/include/ScintillaTypes.h:704:16: note: ‘intptr_t’ is defined in header ‘<cstdint>’; this is probably fixable by adding ‘#include <cstdint>’
../../src/scintilla/include/ScintillaTypes.h:708:11: error: ‘Position’ does not name a type
  708 | constexpr Position InvalidPosition = -1;
      |           ^~~~~~~~
In file included from ../../src/scintilla/qt/ScintillaEdit/ScintillaDocument.cpp:15:
../../src/scintilla/include/ScintillaStructures.h:23:9: error: ‘Position’ does not name a type; did you mean ‘PositionCR’?
   23 |         Position cpMin;
      |         ^~~~~~~~
      |         PositionCR
../../src/scintilla/include/ScintillaStructures.h:24:9: error: ‘Position’ does not name a type; did you mean ‘PositionCR’?
   24 |         Position cpMax;
      |         ^~~~~~~~
      |         PositionCR
../../src/scintilla/include/ScintillaStructures.h:81:9: error: ‘uptr_t’ does not name a type
   81 |         uptr_t idFrom;
      |         ^~~~~~
../../src/scintilla/include/ScintillaStructures.h:89:9: error: ‘Position’ does not name a type; did you mean ‘PositionCR’?
   89 |         Position position;
      |         ^~~~~~~~
      |         PositionCR
../../src/scintilla/include/ScintillaStructures.h:107:9: error: ‘Position’ does not name a type; did you mean ‘PositionCR’?
  107 |         Position length;                /* SCN_MODIFIED */
      |         ^~~~~~~~
      |         PositionCR
../../src/scintilla/include/ScintillaStructures.h:108:9: error: ‘Position’ does not name a type; did you mean ‘PositionCR’?
  108 |         Position linesAdded;    /* SCN_MODIFIED */
      |         ^~~~~~~~
      |         PositionCR
../../src/scintilla/include/ScintillaStructures.h:110:9: error: ‘uptr_t’ does not name a type
  110 |         uptr_t wParam;  /* SCN_MACRORECORD */
      |         ^~~~~~
../../src/scintilla/include/ScintillaStructures.h:111:9: error: ‘sptr_t’ does not name a type
  111 |         sptr_t lParam;  /* SCN_MACRORECORD */
      |         ^~~~~~
../../src/scintilla/include/ScintillaStructures.h:112:9: error: ‘Position’ does not name a type; did you mean ‘PositionCR’?
  112 |         Position line;          /* SCN_MODIFIED */
      |         ^~~~~~~~
      |         PositionCR
../../src/scintilla/include/ScintillaStructures.h:120:9: error: ‘Position’ does not name a type; did you mean ‘PositionCR’?
  120 |         Position annotationLinesAdded;  /* SCN_MODIFIED with SC_MOD_CHANGEANNOTATION */
      |         ^~~~~~~~
      |         PositionCR
In file included from ../../src/scintilla/qt/ScintillaEdit/ScintillaDocument.cpp:38:
../../src/scintilla/src/ViewStyle.h:42:49: error: ‘uptr_t’ is not a member of ‘Scintilla’; did you mean ‘uptr_t’?
   42 | inline ColourOptional OptionalColour(Scintilla::uptr_t wParam, Scintilla::sptr_t lParam) noexcept {
      |                                                 ^~~~~~
In file included from ../../src/scintilla/qt/ScintillaEdit/ScintillaDocument.cpp:24:
../../src/scintilla/include/Scintilla.h:32:19: note: ‘uptr_t’ declared here
   32 | typedef uintptr_t uptr_t;
      |                   ^~~~~~
../../src/scintilla/src/ViewStyle.h:42:75: error: ‘sptr_t’ is not a member of ‘Scintilla’; did you mean ‘sptr_t’?
   42 | inline ColourOptional OptionalColour(Scintilla::uptr_t wParam, Scintilla::sptr_t lParam) noexcept {
      |                                                                           ^~~~~~
../../src/scintilla/include/Scintilla.h:34:18: note: ‘sptr_t’ declared here
   34 | typedef intptr_t sptr_t;
      |                  ^~~~~~
../../src/scintilla/src/ViewStyle.h:42:90: error: expected ‘,’ or ‘;’ before ‘noexcept’
   42 | inline ColourOptional OptionalColour(Scintilla::uptr_t wParam, Scintilla::sptr_t lParam) noexcept {
      |                                                                                          ^~~~~~~~
../../src/scintilla/src/ViewStyle.h:229:67: error: ‘Scintilla::uptr_t’ has not been declared
  229 |         bool SetElementColourOptional(Scintilla::Element element, Scintilla::uptr_t wParam, Scintilla::sptr_t lParam);
      |                                                                   ^~~~~~~~~
../../src/scintilla/src/ViewStyle.h:229:93: error: ‘Scintilla::sptr_t’ has not been declared
  229 |         bool SetElementColourOptional(Scintilla::Element element, Scintilla::uptr_t wParam, Scintilla::sptr_t lParam);
      |                                                                                             ^~~~~~~~~

For the include of <cstdint>
First i checked their bugtracker, but it seems that this would be related:
https://sourceforge.net/p/scintilla/bugs/2458/

but that was already coded with this commit:
https://sourceforge.net/p/scintilla/code/ci/c7ffad21b23dfad4e8e9f36bb587acc2f6e84fee/

From my side i could only fix this with this patch:

diff --git a/src/scintilla/qt/ScintillaEdit/ScintillaDocument.cpp b/src/scintilla/qt/ScintillaEdit/ScintillaDocument.cpp
index fc5ef2e..71bbaf0 100644
--- a/src/scintilla/qt/ScintillaEdit/ScintillaDocument.cpp
+++ b/src/scintilla/qt/ScintillaEdit/ScintillaDocument.cpp
@@ -9,6 +9,7 @@
 #include <set>
 #include <optional>
 #include <memory>
+#include <cstdint>
 
 #include "ScintillaTypes.h"
 #include "ScintillaMessages.h"

I am currently not sure if that is 100% a issue with upstream or related how the dependency is built with this project.

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildCompilation/build issueslinuxRelated specifically to Linux-based OSsscintillaDirectly related to the Scintilla editing component

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions