public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/51674] New: No errors on non-existent symbol in costructor
@ 2011-12-24 14:02 so.townsend at gmail dot com
2011-12-24 14:12 ` [Bug c++/51674] No errors on non-existent symbol in constructor so.townsend at gmail dot com
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: so.townsend at gmail dot com @ 2011-12-24 14:02 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51674
Bug #: 51674
Summary: No errors on non-existent symbol in costructor
Classification: Unclassified
Product: gcc
Version: 4.6.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: so.townsend@gmail.com
Created attachment 26183
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26183
Example of problem
Creating a class with a constructor that calls another construct with a non
existent symbol yields a segfault and no compile time errors or warnings.
Both -std=C++0x and standard compilation have the same issue.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/51674] No errors on non-existent symbol in constructor
2011-12-24 14:02 [Bug c++/51674] New: No errors on non-existent symbol in costructor so.townsend at gmail dot com
@ 2011-12-24 14:12 ` so.townsend at gmail dot com
2011-12-24 14:14 ` redi at gcc dot gnu.org
2011-12-24 14:37 ` redi at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: so.townsend at gmail dot com @ 2011-12-24 14:12 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51674
--- Comment #1 from So Townsend <so.townsend at gmail dot com> 2011-12-24 14:02:34 UTC ---
Comment on attachment 26183
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26183
Example of problem
>#include <iostream>
>
>class Foo
>{
>public:
> Foo()
> {
> Foo(a);
> }
>
> Foo(int x)
> {
> }
>};
>
>int main()
>{
> Foo f;
> return 0;
>}
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/51674] No errors on non-existent symbol in constructor
2011-12-24 14:02 [Bug c++/51674] New: No errors on non-existent symbol in costructor so.townsend at gmail dot com
2011-12-24 14:12 ` [Bug c++/51674] No errors on non-existent symbol in constructor so.townsend at gmail dot com
@ 2011-12-24 14:14 ` redi at gcc dot gnu.org
2011-12-24 14:37 ` redi at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: redi at gcc dot gnu.org @ 2011-12-24 14:14 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51674
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-12-24 14:12:08 UTC ---
that doesn't call a constructor, it declares an object called a, so is
identical to:
Foo()
{
Foo a;
}
which causes an infinite recursion
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/51674] No errors on non-existent symbol in constructor
2011-12-24 14:02 [Bug c++/51674] New: No errors on non-existent symbol in costructor so.townsend at gmail dot com
2011-12-24 14:12 ` [Bug c++/51674] No errors on non-existent symbol in constructor so.townsend at gmail dot com
2011-12-24 14:14 ` redi at gcc dot gnu.org
@ 2011-12-24 14:37 ` redi at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: redi at gcc dot gnu.org @ 2011-12-24 14:37 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51674
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-12-24 14:14:16 UTC ---
well, sorry, it does call a constructor, but it calls the same one (the default
cosntructor)
it doesn't call the other constructor "with a non-existent symbol"
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-12-24 14:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-24 14:02 [Bug c++/51674] New: No errors on non-existent symbol in costructor so.townsend at gmail dot com
2011-12-24 14:12 ` [Bug c++/51674] No errors on non-existent symbol in constructor so.townsend at gmail dot com
2011-12-24 14:14 ` redi at gcc dot gnu.org
2011-12-24 14:37 ` redi at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).