-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compiler error with c++ templates using teensy platform only #94
Comments
However, it does fail if I use Teensy 3.2, where code is compiled with "-fsingle-precision-constant" option. This is the expected result with -fsingle-precision-constant. Perhaps PlatformIO is incorrectly using -fsingle-precision-constant with Teensy 4.1? It is only supposed to be used with the older boards. |
Yup, it seems that -fsingle-precision-constant is used with all boards on platformio. I'll file a bug. |
Thanks for reporting, should be fixed in the dev branch. |
I can compile this code using gcc or the native platform in platformio, but I am getting an error when I build for the Teensy4.1:
The error I get is:
src/exec/MainExec.cpp: In function 'int main()': src/exec/MainExec.cpp:12:26: error: no matching function for call to 'saturate(double&, float, float)' saturate(v, 0.0, 90.0);
Expected behavior: the compiler to make all three arguments doubles.
Is this a bug with the teensy platform or with the compiler?
The text was updated successfully, but these errors were encountered: