For an embedded project I'd like to know when does a standard-compliant C-compiler (C99) and C++-compiler (C++11) will most likely implicitly promote a single-float variable/value to double-float.
I'm aware of two cases:
- literals which are not suffixed with
f. For example:3.14 - passing a float to function with variadic argument-list (
...)
Are there any others? What about templates?
The answers of this question are very helpful for me as well - including it here for reference.