Indeed. Aside numerous whitespace difference (and a spurious ^J between real and imaginary parts)(this probably passes unseeen) the problem is in the blank-leaded formats '(O6)','(B6)' etc where the requested 6 digit is not respected. Code uses standard C++ std:: formatting and works with my gcc 4.9.2. Would that be a C++11 feature of a newer gcc version?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
For Debian, we compile with gcc-5.3.1 and are not affected by this bug; also test_formats is "Passed". gcc-6 does not compile for another reason. My personal CI test compilation is with 4.8.4, BTW. Therefore, it is probably not the compiler version.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm seeing different but still wrong behavior with 0.9.6 and gcc 4.4.7 on stock EL6. I see lots of whitespace output before the number. Was fine with 0.9.5.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
pretty strange... 'w' is part of the FMTNode class, is initialised in the constructor to -1 (in fmtnode.hpp). So I see no way it could not be initialized?
BTW valgrind on my GDL version (64 bits, gcc 4.9.2) does not see any errors (and formats correctly).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
On mandriva (= ubuntu) 64 bits I get:
and
is that a 32 bits machine?
Hmm, strange.
That's a 64 bits machine:
And GDL 0.9.3 and 0.9.5 work as intended.
What should I check out?
Last edit: Igor 2016-01-27
Well, no clue on my side...
The test_formats.pro file compares various formats with the idl template, just to see the extent of the disaster...
Thanks! Comparison results are not very good - formats.gdl and formats.idl are attached...
Indeed. Aside numerous whitespace difference (and a spurious ^J between real and imaginary parts)(this probably passes unseeen) the problem is in the blank-leaded formats '(O6)','(B6)' etc where the requested 6 digit is not respected. Code uses standard C++ std:: formatting and works with my gcc 4.9.2. Would that be a C++11 feature of a newer gcc version?
For Debian, we compile with gcc-5.3.1 and are not affected by this bug; also test_formats is "Passed". gcc-6 does not compile for another reason. My personal CI test compilation is with 4.8.4, BTW. Therefore, it is probably not the compiler version.
I've got gcc 4.4.7. It's pretty old, yes. Should I update it?
OK, I've updated to gcc 4.9.3 and now gdl 0.9.6 prints correctly. Thanks guys! Problem is solved! :)
BTW, gcc 4.7.2 does not solve this issue but makes it even worse.
I'm seeing different but still wrong behavior with 0.9.6 and gcc 4.4.7 on stock EL6. I see lots of whitespace output before the number. Was fine with 0.9.5.
valgrind is reporting some "Conditional jump or move depends on uninitialised value(s)" errors.
So it looks like "w" may be uninitialized. It's "set" here:
Is that always a valid property? Then in OFmtI():
In a debug session, I see:
pretty strange... 'w' is part of the FMTNode class, is initialised in the constructor to -1 (in fmtnode.hpp). So I see no way it could not be initialized?
BTW valgrind on my GDL version (64 bits, gcc 4.9.2) does not see any errors (and formats correctly).
Closing as resolved, valgrind issues will pop up automatically after enabling valgrind test runs on Travis