Skip to content
This repository has been archived by the owner on Jan 2, 2024. It is now read-only.

Ubuntu 15.04 ARM GCC firmware compile failure #12

Closed
sharebrained opened this issue Jul 8, 2015 · 2 comments
Closed

Ubuntu 15.04 ARM GCC firmware compile failure #12

sharebrained opened this issue Jul 8, 2015 · 2 comments
Assignees

Comments

@sharebrained
Copy link
Collaborator

Compiling main.cpp
In file included from main.cpp:41:0:
dsp_decimate.hpp: In constructor 'dsp::decimate::FIR64AndDecimateBy2Real::FIR64AndDecimateBy2Real(const std::array<short int, 64u>&)':
dsp_decimate.hpp:63:18: error: invalid initialization of reference of type 'const std::array<short int, 64u>&' from expression of type ''
) : taps { taps }
^
main.cpp: In constructor 'FSKProcessor::FSKProcessor(MessageHandlerMap&)':
main.cpp:577:42: error: invalid initialization of non-const reference of type 'MessageHandlerMap&' from an rvalue of type ''
) : message_handlers { message_handlers }
^
../chibios/os/ports/GCC/ARMCMx/rules.mk:165: recipe for target 'build/obj/main.o' failed
make[1]: *** [build/obj/main.o] Error 1
make[1]: Leaving directory '/home/redacted/portapack-hackrf/firmware/baseband'
Makefile:89: recipe for target '../baseband/build/baseband.elf' failed
make: *** [../baseband/build/baseband.elf] Error 2

@sharebrained
Copy link
Collaborator Author

The relevant package is: arm-none-eabi-gcc (4.8.3-18ubuntu2+12) 4.8.3

@jboone jboone self-assigned this Jul 8, 2015
@jboone
Copy link
Contributor

jboone commented Jul 17, 2015

This error is correct by the letter of the C++11 standard. Read:

http://stackoverflow.com/questions/10509603/why-cant-i-initialize-a-reference-in-an-initializer-list-with-uniform-initializ

However, it was considered an oversight in C++11 and has been changed in C++14:

http://open-std.org/JTC1/SC22/WG21/docs/cwg_defects.html#1288

GCC 4.8 is correct to emit this error, by C++11 standards.
GCC 4.9 is correct to NOT emit this error, by C++14 standards.
So what to do?!

jboone added a commit that referenced this issue Jul 17, 2015
@jboone jboone closed this as completed Jul 17, 2015
jboone pushed a commit that referenced this issue May 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant