[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: g++ behavior while noncopyable class

From: Jorgen Grahn
Subject: Re: g++ behavior while noncopyable class
Date: 3 Apr 2012 10:36:27 GMT
User-agent: slrn/pre1.0.0-18 (Linux)

["Followup-To:" header set to comp.lang.c++.]
On Wed, 2012-03-28, Alex Vinokur wrote:
> Hi,
> While compiling program below, behavior of g++ differs from Intel and
> aCC HP compilers.
> g++ detects error.
>> icpc test1.cpp
> // No errors
>> aCC test1.cpp
> // No errors
>> g++ test1.cpp

At least with g++, you really *need* to provide flags to set the
warning level and C++ standard level, if you're at all interested in
getting warnings about broken code. A good starting point:

  g++ -Wall -Wextra -pedantic -Wold-style-cast -std=c++98 -O3

I expect the other two compilers to behave in a similar way.


  // Jorgen Grahn <grahn@  Oo  o.   .     .
\X/>   O  o   .

reply via email to

[Prev in Thread] Current Thread [Next in Thread]