I have come across some code that basically is:
double x = 0.0d;
The d
suggests to me that this is a suffix for doubles, but the documentation for floating point literals does not have it, and I cannot find any mention in the GNU g++ documentation. The compiler doesn't throw out any warnings either with -Wall
.
I've made a small sample on GodBolt which answers my question with -Wpedantic
, but I'd still like to see the documentation for this issue.
* Note that a similar question for Java exists.