a3ee2c625e
> idlc/source/astexpression.cxx:330:68: error: implicit conversion from 'sal_Int32' (aka 'int') to 'float' changes value from 2147483647 to 2147483648 [-Werror,-Wimplicit-int-float-conversion] > if (ev->u.fval < SAL_MIN_INT32 || ev->u.fval > SAL_MAX_INT32) > ~ ^~~~~~~~~~~~~ > include/sal/types.h:209:32: note: expanded from macro 'SAL_MAX_INT32' > #define SAL_MAX_INT32 ((sal_Int32) 0x7FFFFFFF) > ^~~~~~~~~~~~~~~~~~~~~~~ > idlc/source/astexpression.cxx:414:58: error: implicit conversion from 'sal_uInt32' (aka 'unsigned int') to 'float' changes value from 4294967295 to 4294967296 [-Werror,-Wimplicit-int-float-conversion] > if (ev->u.fval < 0.0 || ev->u.fval > SAL_MAX_UINT32) > ~ ^~~~~~~~~~~~~~ > include/sal/types.h:210:32: note: expanded from macro 'SAL_MAX_UINT32' > #define SAL_MAX_UINT32 ((sal_uInt32) 0xFFFFFFFF) > ^~~~~~~~~~~~~~~~~~~~~~~ > idlc/source/astexpression.cxx:492:68: error: implicit conversion from 'sal_Int64' (aka 'long') to 'float' changes value from 9223372036854775807 to 9223372036854775808 [-Werror,-Wimplicit-int-float-conversion] > if (ev->u.fval < SAL_MIN_INT64 || ev->u.fval > SAL_MAX_INT64) > ~ ^~~~~~~~~~~~~ > include/sal/types.h:212:32: note: expanded from macro 'SAL_MAX_INT64' > #define SAL_MAX_INT64 ((sal_Int64) SAL_CONST_INT64(0x7FFFFFFFFFFFFFFF)) > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > idlc/source/astexpression.cxx:501:68: error: implicit conversion from 'sal_Int64' (aka 'long') to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Werror,-Wimplicit-int-float-conversion] > if (ev->u.dval < SAL_MIN_INT64 || ev->u.dval > SAL_MAX_INT64) > ~ ^~~~~~~~~~~~~ > include/sal/types.h:212:32: note: expanded from macro 'SAL_MAX_INT64' > #define SAL_MAX_INT64 ((sal_Int64) SAL_CONST_INT64(0x7FFFFFFFFFFFFFFF)) > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > idlc/source/astexpression.cxx:574:58: error: implicit conversion from 'sal_uInt64' (aka 'unsigned long') to 'float' changes value from 18446744073709551615 to 18446744073709551616 [-Werror,-Wimplicit-int-float-conversion] > if (ev->u.fval < 0.0 || ev->u.fval > SAL_MAX_UINT64) > ~ ^~~~~~~~~~~~~~ > include/sal/types.h:213:32: note: expanded from macro 'SAL_MAX_UINT64' > #define SAL_MAX_UINT64 ((sal_uInt64) SAL_CONST_UINT64(0xFFFFFFFFFFFFFFFF)) > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > idlc/source/astexpression.cxx:583:58: error: implicit conversion from 'sal_uInt64' (aka 'unsigned long') to 'double' changes value from 18446744073709551615 to 18446744073709551616 [-Werror,-Wimplicit-int-float-conversion] > if (ev->u.dval < 0.0 || ev->u.dval > SAL_MAX_UINT64) > ~ ^~~~~~~~~~~~~~ > include/sal/types.h:213:32: note: expanded from macro 'SAL_MAX_UINT64' > #define SAL_MAX_UINT64 ((sal_uInt64) SAL_CONST_UINT64(0xFFFFFFFFFFFFFFFF)) > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Consitently use the new o3tl::convertsToAtLeast/Most(o3tl::roundAway(...), ...) for all cases in coerce_value that check that a floating-point value falls into an integer range, even those that don't cause a warning. The new idlc/test/parser/conversion.tests is deliberately left out of unoidl/CustomTarget_unoidl-write_test.mk. as unoidl-write doesn't support such conversions from floating-point to integer types. Change-Id: Ie00923e665f2bcb306e1e328614c75b9247512ee Reviewed-on: https://gerrit.libreoffice.org/77353 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
91 lines
5 KiB
Makefile
91 lines
5 KiB
Makefile
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
|
|
#
|
|
# This file is part of the LibreOffice project.
|
|
#
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
#
|
|
|
|
$(eval $(call gb_CustomTarget_CustomTarget,idlc/parser_test))
|
|
|
|
# this target is phony to run it every time
|
|
.PHONY : $(call gb_CustomTarget_get_target,idlc/parser_test)
|
|
|
|
$(call gb_CustomTarget_get_target,idlc/parser_test) : \
|
|
$(call gb_Executable_get_runtime_dependencies,idlc) \
|
|
$(SRCDIR)/solenv/bin/exectest.pl \
|
|
$(SRCDIR)/idlc/test/parser/attribute.tests \
|
|
$(SRCDIR)/idlc/test/parser/constant.tests \
|
|
$(SRCDIR)/idlc/test/parser/constructor.tests \
|
|
$(SRCDIR)/idlc/test/parser/conversion.tests \
|
|
$(SRCDIR)/idlc/test/parser/interfaceinheritance.tests \
|
|
$(SRCDIR)/idlc/test/parser/methodoverload.tests \
|
|
$(SRCDIR)/idlc/test/parser/polystruct.tests \
|
|
$(SRCDIR)/idlc/test/parser/published.tests \
|
|
$(SRCDIR)/idlc/test/parser/struct.tests \
|
|
$(SRCDIR)/idlc/test/parser/typedef.tests \
|
|
| $(call gb_CustomTarget_get_workdir,idlc/parser_test)/.dir
|
|
ifneq ($(gb_SUPPRESS_TESTS),)
|
|
@true
|
|
else
|
|
$(call gb_Helper_abbreviate_dirs,( \
|
|
$(PERL) $(SRCDIR)/solenv/bin/exectest.pl \
|
|
$(SRCDIR)/idlc/test/parser/attribute.tests \
|
|
$(call gb_CustomTarget_get_workdir,idlc/parser_test)/in.idl 0 \
|
|
$(call gb_Executable_get_command,idlc) \
|
|
-O $(call gb_CustomTarget_get_workdir,idlc/parser_test) {} && \
|
|
$(PERL) $(SRCDIR)/solenv/bin/exectest.pl \
|
|
$(SRCDIR)/idlc/test/parser/constant.tests \
|
|
$(call gb_CustomTarget_get_workdir,idlc/parser_test)/in.idl 0 \
|
|
$(call gb_Executable_get_command,idlc) \
|
|
-O $(call gb_CustomTarget_get_workdir,idlc/parser_test) {} && \
|
|
$(PERL) $(SRCDIR)/solenv/bin/exectest.pl \
|
|
$(SRCDIR)/idlc/test/parser/constructor.tests \
|
|
$(call gb_CustomTarget_get_workdir,idlc/parser_test)/in.idl 0 \
|
|
$(call gb_Executable_get_command,idlc) \
|
|
-O $(call gb_CustomTarget_get_workdir,idlc/parser_test) {} && \
|
|
$(PERL) $(SRCDIR)/solenv/bin/exectest.pl \
|
|
$(SRCDIR)/idlc/test/parser/conversion.tests \
|
|
$(call gb_CustomTarget_get_workdir,idlc/parser_test)/in.idl 0 \
|
|
$(call gb_Executable_get_command,idlc) \
|
|
-O $(call gb_CustomTarget_get_workdir,idlc/parser_test) {} && \
|
|
$(PERL) $(SRCDIR)/solenv/bin/exectest.pl \
|
|
$(SRCDIR)/idlc/test/parser/interfaceinheritance.tests \
|
|
$(call gb_CustomTarget_get_workdir,idlc/parser_test)/in.idl 0 \
|
|
$(call gb_Executable_get_command,idlc) \
|
|
-O $(call gb_CustomTarget_get_workdir,idlc/parser_test) {} && \
|
|
$(PERL) $(SRCDIR)/solenv/bin/exectest.pl \
|
|
$(SRCDIR)/idlc/test/parser/methodoverload.tests \
|
|
$(call gb_CustomTarget_get_workdir,idlc/parser_test)/in.idl 0 \
|
|
$(call gb_Executable_get_command,idlc) \
|
|
-O $(call gb_CustomTarget_get_workdir,idlc/parser_test) {} && \
|
|
$(PERL) $(SRCDIR)/solenv/bin/exectest.pl \
|
|
$(SRCDIR)/idlc/test/parser/oldstyle.tests \
|
|
$(call gb_CustomTarget_get_workdir,idlc/parser_test)/in.idl 0 \
|
|
$(call gb_Executable_get_command,idlc) \
|
|
-O $(call gb_CustomTarget_get_workdir,idlc/parser_test) {} && \
|
|
$(PERL) $(SRCDIR)/solenv/bin/exectest.pl \
|
|
$(SRCDIR)/idlc/test/parser/polystruct.tests \
|
|
$(call gb_CustomTarget_get_workdir,idlc/parser_test)/in.idl 0 \
|
|
$(call gb_Executable_get_command,idlc) \
|
|
-O $(call gb_CustomTarget_get_workdir,idlc/parser_test) {} && \
|
|
$(PERL) $(SRCDIR)/solenv/bin/exectest.pl \
|
|
$(SRCDIR)/idlc/test/parser/published.tests \
|
|
$(call gb_CustomTarget_get_workdir,idlc/parser_test)/in.idl 0 \
|
|
$(call gb_Executable_get_command,idlc) \
|
|
-O $(call gb_CustomTarget_get_workdir,idlc/parser_test) {} && \
|
|
$(PERL) $(SRCDIR)/solenv/bin/exectest.pl \
|
|
$(SRCDIR)/idlc/test/parser/struct.tests \
|
|
$(call gb_CustomTarget_get_workdir,idlc/parser_test)/in.idl 0 \
|
|
$(call gb_Executable_get_command,idlc) \
|
|
-O $(call gb_CustomTarget_get_workdir,idlc/parser_test) {} && \
|
|
$(PERL) $(SRCDIR)/solenv/bin/exectest.pl \
|
|
$(SRCDIR)/idlc/test/parser/typedef.tests \
|
|
$(call gb_CustomTarget_get_workdir,idlc/parser_test)/in.idl 0 \
|
|
$(call gb_Executable_get_command,idlc) \
|
|
-O $(call gb_CustomTarget_get_workdir,idlc/parser_test) {}) \
|
|
> $@.log 2>&1 || (cat $@.log && false))
|
|
endif
|
|
|
|
# vim: set noet sw=4 ts=4:
|