Bug 4648 - fails to build with gcc 13
Summary: fails to build with gcc 13
Status: RESOLVED FIXED
Alias: None
Product: Claws Mail
Classification: Unclassified
Component: Plugins/LiteHTML Viewer (show other bugs)
Version: 4.2.0
Hardware: PC Linux
: P3 normal
Assignee: users
URL:
Depends on:
Blocks:
 
Reported: 2022-10-29 15:59 UTC by Sergei Trofimovich
Modified: 2023-04-19 17:43 UTC (History)
0 users

See Also:


Attachments

Description Sergei Trofimovich 2022-10-29 15:59:56 UTC
gcc-13 cleaned up a few more transitive headers in it's STL: https://gcc.gnu.org/gcc-13/changes.html

As a result claws-mail-4.1.1 (and git) fails to build as:

claws-mail> In file included from html.h:12,
claws-mail>                  from iterators.cpp:1:
claws-mail> os_types.h:68:22: error: 'uintptr_t' in namespace 'std' does not name a type
claws-mail>    68 |         typedef std::uintptr_t                  uint_ptr;
claws-mail>       |                      ^~~~~~~~~
claws-mail> In file included from html.h:12,
claws-mail>                  from el_style.cpp:1:
claws-mail> os_types.h:68:22: error: 'uintptr_t' in namespace 'std' does not name a type
claws-mail>    68 |         typedef std::uintptr_t                  uint_ptr;
claws-mail>       |                      ^~~~~~~~~

The following seems to be enough to fix it, but I'm not sure it's the correct place to add missing header:

--- a/src/plugins/litehtml_viewer/litehtml/os_types.h
+++ b/src/plugins/litehtml_viewer/litehtml/os_types.h
@@ -1,6 +1,8 @@
 #ifndef LH_OS_TYPES_H
 #define LH_OS_TYPES_H

+#include <cstdint>
+
 namespace litehtml
 {
 #if defined( WIN32 ) || defined( _WIN32 ) || defined( WINCE )

Thanks!
Comment 1 Paul 2023-01-09 12:12:27 UTC
re-open if this still occurs once gcc-13 development has finished and it is released.
Comment 2 Sergei Trofimovich 2023-01-09 17:34:20 UTC
Sure.

Out of curiosity why do you see the change as invalid? https://en.cppreference.com/w/cpp/types/integer agrees std::uintptr_t comes from <cstdint>.
Comment 3 Paul 2023-02-27 09:44:56 UTC
Sergei, I have closed this bug report as INVALID; this does not mean that I see the change in gcc-13 as INVALID, it means I see this bug report as INVALID. I see this bug report as INVALID because it is reporting a bug that occurs in unreleased software (gcc-13).
Comment 4 Paul 2023-04-19 17:43:28 UTC
fixed in git.

Note You need to log in before you can comment on or make changes to this bug.