Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

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

12 views
Skip to first unread message

James Moe

unread,
May 9, 2016, 5:46:09 PM5/9/16
to
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

James Moe

unread,
May 9, 2016, 6:43:58 PM5/9/16
to
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.

Steven Levine

unread,
May 10, 2016, 8:29:34 PM5/10/16
to
On Mon, 9 May 2016 22:43:56 UTC, James Moe
<jimoe...@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 <ste...@earthlink.bogus.net>
DIY/Warp/BlueLion etc. www.scoug.com www.arcanoae.com www.warpcave.com
---------------------------------------------------------------------

Paul Smedley

unread,
May 20, 2016, 5:18:17 PM5/20/16
to
Hi guys,

On 11/05/16 09:59, Steven Levine wrote:
> On Mon, 9 May 2016 22:43:56 UTC, James Moe
> <jimoe...@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

Dave Yeo

unread,
May 21, 2016, 2:45:17 AM5/21/16
to
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 new messages