Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 674402 - app-text/libwpd-0.10.3 with sys-devel/gcc-6.4.0-r5 - In file included from WPXTable.cpp:28:0: WPXTable.h:56:23: error: expected ‘;’ at end of member declaration
Summary: app-text/libwpd-0.10.3 with sys-devel/gcc-6.4.0-r5 - In file included from WP...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Office Team
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2019-01-03 11:14 UTC by Joakim Tjernlund
Modified: 2019-01-13 20:45 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joakim Tjernlund 2019-01-03 11:14:13 UTC
libtool: compile:  x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I../.. -I../../inc -I/usr/include/librevenge-0.0 -DNDEBUG -DLIBWPD_BUILD=1 -fvisibility=hidden -DLIBWPD_VISIBILITY -O2 -pipe -Wall -Wextra -pedantic -Wshadow -Wunused-variable -Weffc++ -c WPXTable.cpp  -fPIC -DPIC -o .libs/WPXTable.o
libtool: compile:  x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I../.. -I../../inc -I/usr/include/librevenge-0.0 -DNDEBUG -DLIBWPD_BUILD=1 -fvisibility=hidden -DLIBWPD_VISIBILITY -O2 -pipe -Wall -Wextra -pedantic -Wshadow -Wunused-variable -Weffc++ -c WPXTableList.cpp  -fPIC -DPIC -o .libs/WPXTableList.o
In file included from WPXTable.cpp:28:0:
WPXTable.h:56:23: error: expected ‘;’ at end of member declaration
  const WPXTableCell  *getCell(size_t i, size_t j)
                       ^~~~~~~
WPXTable.h:56:38: error: expected ‘)’ before ‘i’
  const WPXTableCell  *getCell(size_t i, size_t j)
                                      ^
WPXTable.h:49:7: warning: ‘class WPXTable’ has pointer data members [-Weffc++]
 class WPXTable
       ^~~~~~~~
WPXTable.h:49:7: warning:   but does not override ‘WPXTable(const WPXTable&)’ [-Weffc++]
WPXTable.h:49:7: warning:   or ‘operator=(const WPXTable&)’ [-Weffc++]
WPXTable.h: In constructor ‘WPXTable::WPXTable()’:
WPXTable.h:52:2: warning: ‘WPXTable::getCell’ should be initialized in the member initialization list [-Weffc++]
  WPXTable() : m_tableRows() {}
  ^~~~~~~~
make[3]: *** [Makefile:1208: WPXTable.lo] Error 1
make[2]: *** [Makefile:382: all-recursive] Error 1
make[1]: *** [Makefile:492: all-recursive] Error 1
make: *** [Makefile:403: all] Error 2
Comment 1 Joakim Tjernlund 2019-01-03 11:15:16 UTC
including cstddef makes it build:

--- ./src/lib/WPXTable.h.org	2019-01-03 10:58:24.563678917 +0100
+++ ./src/lib/WPXTable.h	2019-01-03 12:05:57.141828488 +0100
@@ -36,6 +36,7 @@
 #ifndef _WPXTABLE_H
 #define _WPXTABLE_H
 
+#include <cstddef>
 #include <vector>
 
 struct WPXTableCell
Comment 2 Bob Raitz 2019-01-11 21:51:20 UTC
(In reply to Joakim Tjernlund from comment #1)
> including cstddef makes it build:
> 
> --- ./src/lib/WPXTable.h.org	2019-01-03 10:58:24.563678917 +0100
> +++ ./src/lib/WPXTable.h	2019-01-03 12:05:57.141828488 +0100
> @@ -36,6 +36,7 @@
>  #ifndef _WPXTABLE_H
>  #define _WPXTABLE_H
>  
> +#include <cstddef>
>  #include <vector>
>  
>  struct WPXTableCell

I can verify this. Thanks for the patch.
Comment 3 Larry the Git Cow gentoo-dev 2019-01-13 20:45:16 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=517db018c664c25c9a4db3883ef1ec39cc3588dd

commit 517db018c664c25c9a4db3883ef1ec39cc3588dd
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2019-01-13 17:41:00 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2019-01-13 20:45:02 +0000

    app-text/libwpd: Fix build with GCC-4.8
    
    Closes: https://bugs.gentoo.org/674402
    Package-Manager: Portage-2.3.55, Repoman-2.3.12
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 app-text/libwpd/files/libwpd-0.10.3-gcc-4.8.patch | 16 ++++++++++++++++
 app-text/libwpd/libwpd-0.10.3.ebuild              |  4 +++-
 2 files changed, 19 insertions(+), 1 deletion(-)