This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
I see regression in trunk tests: #include <typeinfo> #include <stdio.h> int main() { int i = 1; double d = 1.1f; printf("%s <--> ", typeid(i + d).name()); printf("%f\n", i + d); printf("%s <--> ", typeid(d + i).name()); printf("%f\n", d + i); // highlighted %f return 0; } My code works in Oracle Solaris Studio, GCC and CLang, but IDE speaks "Replace %f with %d". If I will replace code I will see: ==================================================================== d <--> 2.100000 d <--> -805306368 RUN FINISHED; exit value 0; real time: 0ms; user: 0ms; system: 0ms ==================================================================== or ==================================================================== clang++ -c -g -MMD -MP -MF "build/Debug/CLang-Linux/newfile.o.d" -o build/Debug/CLang-Linux/newfile.o newfile.cpp newfile.cpp:13:20: warning: format specifies type 'int' but the argument has type 'double' [-Wformat] printf("%d\n", d + i); // highlighted %f ~~ ^~~~~ %f 1 warning generated. ====================================================================
Fixed in http://hg.netbeans.org/cnd-main/rev/1497f15a6083
Integrated into 'main-silver', will be available in build *201603220001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/1497f15a6083 User: Petr Kudryavtsev <petrk@netbeans.org> Log: Fixed #258143 - Printf and double + int
Integrated into 'main-silver', will be available in build *201603310001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/3e5d6bd1ef93 User: Petr Kudryavtsev <petrk@netbeans.org> Log: Additional fix for #258143 - Printf and double + int -- fixed diamond operator in CsmCompletionQuery
verified in builds on enum server
Verified in NetBeans 8.1 with latest updates.