ot gnu dot org
ReportedBy: jengliang at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38007
e "bar.h"
#include
bar::bar()
{
A *a = new A();
delete a;
}
--
Summary: class defined in file scope got linked by other files
Product: gcc
Version: 4.2.4
Status: UNCONFIRMED
Severity: normal
Priority: P3
Com
--- Comment #2 from jengliang at gmail dot com 2009-03-20 20:52 ---
(In reply to comment #1)
> You are violating C++'s One definition rule (ODR). This code is undefined
> because the definition of A::A() (and others) are different between the two
> files.
Thanks for the
--- Comment #10 from jengliang at gmail dot com 2010-03-06 01:37 ---
Hi Manuel,
I think it is a good idea to warn about narrowing both from a type to another
type, and from a type to a bit-field. For new codes, one should use the
bit-masking technique for bit-field narrowing just as