Closed
Bug 1416170
Opened 7 years ago
Closed 6 years ago
error: ‘(1.6e+0l / 1.0e+2l)’ is not a constant expression on ppc64/ppc64le
Categories
(Core :: Memory Allocator, defect)
Tracking
()
RESOLVED
FIXED
mozilla59
Tracking | Status | |
---|---|---|
firefox59 | --- | fixed |
People
(Reporter: dan, Assigned: glandium)
Details
Attachments
(1 file)
Our CI shows that a commit from yesterday broke trunk builds on ppc64 and ppc64le, other arches like aarch64 and s390x (and x86_64) are OK. Both ppc64 and ppc64le builders use gcc 7.2.1 (gcc-7.2.1-2.fc27.ppc64le, resp. gcc-7.2.1-2.fc26.ppc64). ... /usr/bin/g++ -std=gnu++11 -o Unified_cpp_memory_build0.o -c -I/home/jenkins/workspace/Firefox-default/label/ppc64le/firefox-src/obj-powerpc64le-unknown-linux-gnu/dist/system_wrappers -include /home/jenkins/workspace/Firefox-default/label/ppc64le/firefox-src/config/gcc_hidden.h -DNDEBUG=1 -DTRIMMED=1 -DMOZ_MEMORY_IMPL -DMOZ_HAS_MOZGLUE -I/home/jenkins/workspace/Firefox-default/label/ppc64le/firefox-src/memory/build -I/home/jenkins/workspace/Firefox-default/label/ppc64le/firefox-src/obj-powerpc64le-unknown-linux-gnu/memory/build -I/home/jenkins/workspace/Firefox-default/label/ppc64le/firefox-src/obj-powerpc64le-unknown-linux-gnu/dist/include -I/home/jenkins/workspace/Firefox-default/label/ppc64le/firefox-src/obj-powerpc64le-unknown-linux-gnu/dist/include/nspr -I/home/jenkins/workspace/Firefox-default/label/ppc64le/firefox-src/obj-powerpc64le-unknown-linux-gnu/dist/include/nss -fPIC -DMOZILLA_CLIENT -include /home/jenkins/workspace/Firefox-default/label/ppc64le/firefox-src/obj-powerpc64le-unknown-linux-gnu/mozilla-config.h -Wall -Wc++11-compat -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wwrite-strings -Wno-invalid-offsetof -Wc++14-compat -Wc++1z-compat -Wduplicated-cond -Wimplicit-fallthrough -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=free-nonheap-object -Wformat -Wformat-overflow=2 -fno-exceptions -fno-strict-aliasing -fno-rtti -fno-exceptions -fno-math-errno -pthread -pipe -g -freorder-blocks -O2 -fno-omit-frame-pointer -MD -MP -MF .deps/Unified_cpp_memory_build0.o.pp /home/jenkins/workspace/Firefox-default/label/ppc64le/firefox-src/obj-powerpc64le-unknown-linux-gnu/memory/build/Unified_cpp_memory_build0.cpp In file included from /home/jenkins/workspace/Firefox-default/label/ppc64le/firefox-src/memory/build/rb.h:70:0, from /home/jenkins/workspace/Firefox-default/label/ppc64le/firefox-src/memory/build/mozjemalloc.cpp:143, from /home/jenkins/workspace/Firefox-default/label/ppc64le/firefox-src/obj-powerpc64le-unknown-linux-gnu/memory/build/Unified_cpp_memory_build0.cpp:2: /home/jenkins/workspace/Firefox-default/label/ppc64le/firefox-src/memory/build/mozjemalloc.cpp:903:47: in constexpr expansion of ‘operator""_percent(1.6e+0l)’ /home/jenkins/workspace/Firefox-default/label/ppc64le/firefox-src/memory/build/Utils.h:47:19: error: ‘(1.6e+0l / 1.0e+2l)’ is not a constant expression return aPercent / 100; ~~~~~~~~~^~~~~ /home/jenkins/workspace/Firefox-default/label/ppc64le/firefox-src/memory/build/mozjemalloc.cpp:904:54: in constexpr expansion of ‘operator""_percent(2.39999999999999999999999999999998e+0l)’ /home/jenkins/workspace/Firefox-default/label/ppc64le/firefox-src/memory/build/Utils.h:47:19: error: ‘(2.39999999999999999999999999999998e+0l / 1.0e+2l)’ is not a constant expression make[4]: *** [/home/jenkins/workspace/Firefox-default/label/ppc64le/firefox-src/config/rules.mk:1030: Unified_cpp_memory_build0.o] Error 1 make[4]: Leaving directory '/home/jenkins/workspace/Firefox-default/label/ppc64le/firefox-src/obj-powerpc64le-unknown-linux-gnu/memory/build' ...
Comment hidden (mozreview-request) |
Comment 3•6 years ago
|
||
mozreview-review |
Comment on attachment 8931196 [details] Bug 1416170 - Don't use long double constants. https://reviewboard.mozilla.org/r/202288/#review207690 ::: memory/build/Utils.h:75 (Diff revision 1) > constexpr size_t operator"" _MiB(long double aNum) > { > return size_t(aNum * 1024_KiB); > } > > -constexpr long double operator""_percent(long double aPercent) > +constexpr double operator""_percent(long double aPercent) Do the arguments for all these operators still need to be long double? If not, the cast below could be removed.
Attachment #8931196 -
Flags: review?(n.nethercote) → review+
Assignee | ||
Comment 4•6 years ago
|
||
See http://en.cppreference.com/w/cpp/language/user_literal under "Only the following parameters lists are allowed"
Currently my regular builds are blocked by bug #1420115 which happens before the "memory" dir is built. But with the proposed fix applied I got the "memory" dir built after "cd obj-powerpc64le-unknown-linux-gnu/memory/; make"
Flags: needinfo?(dan)
Pushed by mh@glandium.org: https://hg.mozilla.org/integration/autoland/rev/147741a99580 Don't use long double constants. r=njn
Comment 7•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/147741a99580
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
status-firefox59:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
Updated•6 years ago
|
Assignee: nobody → mh+mozilla
You need to log in
before you can comment on or make changes to this bug.
Description
•