LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 06-23-2004, 01:44 PM   #1
The_Nerd
Member
 
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)

Code:
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 01:45 PM.
 
Old 06-23-2004, 02:06 PM   #2
infamous41md
Member
 
Registered: Mar 2003
Posts: 804

Rep: Reputation: 30
you should reproduce it exactly and contact g++ developers.
 
Old 06-23-2004, 06:39 PM   #3
The_Nerd
Member
 
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.
 
  


Reply


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 04:45 AM
Sweet Warder ROCK 13 11-05-2005 03:31 PM
Xorg server (fglrx) SEGV calling openGL finidi Linux - Hardware 4 06-29-2005 10:55 AM
GVim, menus, refresh menu and SEGV Weirdofreak Linux - Software 0 11-07-2004 11:10 AM
g_thread_init SEGV The_Nerd Programming 1 06-20-2004 05:00 PM


All times are GMT -5. The time now is 02:17 PM.

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