office-gobmx/cppu
Michael Weghorn 123bb44f4a Extend '-Werror=attributes' workaround to GCC versions < 12.1
Adapt the GCC version check from the workaround introduced
in

    commit 2c6cea672a
    Date:   Wed May 18 10:46:55 2022 +0200

        Work around bogus -Werror=attributes with old GCC

        ...after 9c3c6a6b66 "Replace OFFSET_OF macro with
        a function template", as seen at
        <https://ci.libreoffice.org//job/lo_tb_master_linux_dbg/38076/>,

        > /home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/cppu/source/uno/check.cxx:263:28: error: ‘maybe_unused’ attribute ignored [-Werror=attributes]
        >      [[maybe_unused]] Char3 chars;
        >                             ^~~~~

        (Not sure which versions of GCC are affected exactly; lets restrict this to

to all versions before 12.1.

My GCC 11.3.0 build on Debian testing failed just the
same way otherwise.

A `git log --grep=maybe_unused` in the GCC git repo suggests
that this is no longer necessary from the following
GCC 12.1 commit [1] on:

    commit c0f769fa3114ea852a26d93f0ee3f9595463de0b
    Author: Jason Merrill <jason@redhat.com>
    Date:   Fri Jun 11 16:10:50 2021 -0400

        c-family: don't warn for [[maybe_unused]] on data member

        The C++17 standard (and C2x) says that [[maybe_unused]] may be applied to a
        non-static data member, so we shouldn't warn about it.  And I don't see a
        reason not to handle a FIELD_DECL the same as any other decl, by setting
        TREE_USED on it.  It doesn't look like anything yet cares about that flag on
        a FIELD_DECL, but setting it shouldn't hurt.

        gcc/c-family/ChangeLog:

                * c-attribs.c (handle_unused_attribute): Handle FIELD_DECL.

        gcc/testsuite/ChangeLog:

                * g++.dg/ext/attrib62.C: No longer warn.
                * g++.dg/diagnostic/maybe_unused1.C: New test.

        gcc/ChangeLog:

                * doc/extend.texi (unused variable attribute): Applies to
                structure fields as well.

[1] https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=c0f769fa3114ea852a26d93f0ee3f9595463de0b

Change-Id: I815e4a24da13e0ae66b1dff2941e636c7ebdfd9c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134653
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Jenkins
2022-05-23 08:46:50 +02:00
..
qa Just use Any ctor instead of makeAny in cppu 2022-05-04 21:45:59 +02:00
source Extend '-Werror=attributes' workaround to GCC versions < 12.1 2022-05-23 08:46:50 +02:00
util
CppunitTest_cppu_any-external.mk gbuild: Remove MSVC 2013 legacy code 2017-04-21 18:18:44 +02:00
CppunitTest_cppu_qa_any.mk
CppunitTest_cppu_qa_recursion.mk
CppunitTest_cppu_qa_reference.mk
CppunitTest_cppu_qa_unotype.mk gbuild: Remove MSVC 2013 legacy code 2017-04-21 18:18:44 +02:00
CppunitTest_cppu_test_cppumaker.mk
CppunitTest_cppu_typelib.mk tdf#115399: Don't kill pre-existing typelib_TypeDescription members 2020-04-28 15:07:45 +02:00
InternalUnoApi_cppu_qa_cppumaker_types.mk
InternalUnoApi_cppu_qa_types.mk Directly build UNOIDL .rdb files from .idl files 2013-09-19 15:50:04 +02:00
IwyuFilter_cppu.yaml replace usage of blacklist with excludelist for IWYU 2020-07-10 02:03:40 +02:00
Library_affine_uno_uno.mk gbuild: Remove MSVC 2013 legacy code 2017-04-21 18:18:44 +02:00
Library_cppu.mk Fix clang-cl -Zc:dllexportInlines- build 2021-12-02 07:39:52 +01:00
Library_log_uno_uno.mk
Library_purpenvhelper.mk Fix clang-cl -Zc:dllexportInlines- build 2021-12-02 07:39:52 +01:00
Library_unsafe_uno_uno.mk gbuild: Remove MSVC 2013 legacy code 2017-04-21 18:18:44 +02:00
Makefile
Module_cppu.mk tdf#115399: Don't kill pre-existing typelib_TypeDescription members 2020-04-28 15:07:45 +02:00
README.md Updated README.md files to represent current code / use Markdown format 2021-04-07 17:47:16 +02:00

Binary UNO Runtime

CPPU stands for C++ UNO and it contains type definitions / implementations for the core of UNO. The exported API is in C, and there exists some C++ wrappers.

See also

http://wiki.openoffice.org/wiki/Uno/Binary/Modules/CPPU