Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 06-23-2004, 02:44 PM   #1
Registered: Aug 2002
Distribution: Debian
Posts: 540

Rep: Reputation: 32
g++ caused a SEGV! Sweet!

Check this out:
(writing this from memory... so it my be incomplete)

template <class T>
myotherclass<T> *myclass<T>::operator[](int i)
    myotherclass<T> *Temp=this->Val[i];
    return (Temp==NULL)?this->Val.pData:Temp->pData;
This code (it was VERY similar if not this) caused g++ to segmentation fualt! HAha!

I bet you guys never coded so poorly that gcc caused a SEGV! SWEET!

Thats what happens when you are learning I guess.

Last edited by The_Nerd; 06-23-2004 at 02:45 PM.
Old 06-23-2004, 03:06 PM   #2
Registered: Mar 2003
Posts: 804

Rep: Reputation: 30
you should reproduce it exactly and contact g++ developers.
Old 06-23-2004, 07:39 PM   #3
Registered: Aug 2002
Distribution: Debian
Posts: 540

Original Poster
Rep: Reputation: 32
I was going too, but then I though that I didn't have the newest version of gcc, and that I didn't really want to install an update at this time. Anyhow, I probably will sometime.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sweet 1inxs General 8 11-20-2005 05:45 AM
Sweet Warder ROCK 13 11-05-2005 04:31 PM
Xorg server (fglrx) SEGV calling openGL finidi Linux - Hardware 4 06-29-2005 11:55 AM
GVim, menus, refresh menu and SEGV Weirdofreak Linux - Software 0 11-07-2004 12:10 PM
g_thread_init SEGV The_Nerd Programming 1 06-20-2004 06:00 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:34 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration