f



std::endl is broken in gcc v4.7.3?

Hello,
  os/2 4.5.2
  gcc v4.7.3

  I rebuilt PMMal using gcc 4.7.3 rather than with 3.3.5 because of some
additional features and that 3.3.5 is broken in some ways.
  The program compiles (with lots of warnings about unused vars, but can
be ignored) and builds okay. It does not run, it crashes almost right
away. A build with 3.3.5 runs without a problem.
  The reason for crash is "std::endl". When that is used as a newline,
splat!

  This works in 4.7.3:
cerr << log_timestamp(datetime, TXT_SIZE) << "-C-" << txt << '\n';
  This does not:
cerr << log_timestamp(datetime, TXT_SIZE) << "-C-" << txt << std::endl;

  From the exceptq trap report:
 Module:   LIBC066
 Filename: C:\USR\DLL\LIBC066.DLL 10/26/2014 20:16:29 1,361,666
 Address:  005B:1F3117F2 (0001:000D17F2)
 Cause:    Attempted to write to FFFFFFFF
           (not a valid address)


  The following test program works as expected.

#include <cstdlib>
#include <cstdio>
#include <iostream>
#include <sstream>
#include <iomanip>
#include <string>

using namespace std;

int main (int argc, char ** argv)
{
    cerr << "This is a test of std::endl" << std::endl;

    return 0;
}

  Any suggestions for the usual suspects?

-- 
James Moe
jmm-list at sohnen-moe dot com
0
James
5/9/2016 9:46:07 PM
comp.os.os2.programmer.misc 1326 articles. 0 followers. Post Follow

4 Replies
203 Views

Similar Articles

[PageSpeed] 19

On 05/09/2016 02:46 PM, James Moe wrote:
>  I rebuilt PMMal using gcc 4.7.3 [...]
>
  Bzzt! Operator error! I had not set up the include and library paths
properly.
  Ignore this thread.

-- 
James Moe
jmm-list at sohnen-moe dot com
0
James
5/9/2016 10:43:56 PM
On Mon, 9 May 2016 22:43:56 UTC, James Moe 
<jimoeDESPAM@sohnen-moe.com> wrote:

Hi James,

>   Bzzt! Operator error! I had not set up the include and library paths
> properly.
>   Ignore this thread.

FWIW, if you are going to go to the trouble of switching to a new 
version of the compiler, you should go to at least 4.9.2.  4.7.3 is 
almost 3 years old.  4.9.2 is getting a bit long in the tooth too, but
it is still widely used.

Paul just released a 6.1.0 build, but it's not well tested yet because
it's only a couple of weeks old.

Steven 


-- 
---------------------------------------------------------------------
Steven Levine <steve53@earthlink.bogus.net>
DIY/Warp/BlueLion etc. www.scoug.com www.arcanoae.com www.warpcave.com
---------------------------------------------------------------------
0
Steven
5/11/2016 12:29:33 AM
Hi guys,

On 11/05/16 09:59, Steven Levine wrote:
> On Mon, 9 May 2016 22:43:56 UTC, James Moe
> <jimoeDESPAM@sohnen-moe.com> wrote:
>
> Hi James,
>
>>    Bzzt! Operator error! I had not set up the include and library paths
>> properly.
>>    Ignore this thread.
>
> FWIW, if you are going to go to the trouble of switching to a new
> version of the compiler, you should go to at least 4.9.2.  4.7.3 is
> almost 3 years old.  4.9.2 is getting a bit long in the tooth too, but
> it is still widely used.
>
> Paul just released a 6.1.0 build, but it's not well tested yet because
> it's only a couple of weeks old.

4.9.2 is also in RPM and is very well tested. 6.1.0 seems to work with 
all I've thrown at, but I've had no other real feedback.  Maybe I should 
just add it to my site...

Cheers,

Paul

0
Paul
5/20/2016 9:18:16 PM
Paul Smedley wrote:
> Hi guys,
>
> On 11/05/16 09:59, Steven Levine wrote:
>> On Mon, 9 May 2016 22:43:56 UTC, James Moe
>> <jimoeDESPAM@sohnen-moe.com> wrote:
>>
>> Hi James,
>>
>>>    Bzzt! Operator error! I had not set up the include and library paths
>>> properly.
>>>    Ignore this thread.
>>
>> FWIW, if you are going to go to the trouble of switching to a new
>> version of the compiler, you should go to at least 4.9.2.  4.7.3 is
>> almost 3 years old.  4.9.2 is getting a bit long in the tooth too, but
>> it is still widely used.
>>
>> Paul just released a 6.1.0 build, but it's not well tested yet because
>> it's only a couple of weeks old.
>
> 4.9.2 is also in RPM and is very well tested. 6.1.0 seems to work with
> all I've thrown at, but I've had no other real feedback.  Maybe I should
> just add it to my site...
>

Wget keeps failing when I've tried to download it. I'll try again but 
expect that it'll have the same problems as all GCC versions since 
4.4.6. Compare http://fate.ffmpeg.org/history.cgi?slot=x86.os2.446 vs 
http://fate.ffmpeg.org/history.cgi?slot=x86.os2.492. Some of the 
failures came with the update from libc065 to libc066 (MP2 muxing and 
tests that depend on it). Libc065 only works correctly on Warp v4 
without patching for the FPU control word bug.
I'd also like to try building Mozilla as a good test of C++ support but 
have become more dependent on RPM/YUM as only that Python correctly does 
the _virtualenv thing.
Dave

0
Dave
5/21/2016 6:45:15 AM
Reply: