🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #1666

[cote@tesecau.iro.umontreal.ca : Problem with increment operator]

#1666
From: Brendan Kehoe
Date: Wed, 27 Jan 1993 03:25
33 lines
1878 bytes
------- Start of forwarded message -------
From: cote@tesecau.iro.umontreal.ca (Marcel Cote)
Subject: Problem with increment operator
To: bug-g++@prep.ai.mit.edu
Date: Fri, 22 Jan 1993 03:12:32 GMT
Newsgroups: gnu.g++.bug
Organization: Universite de Montreal, Canada

To whom it may concern,

	This letter is to ask if you have any information concerning a discrepancy
I found while preparing data for a course.  The machine I was working on was a 
Sparc II with the operating system SunOS release 4.1.3.  There are no problems for 
compiling but at execution there is a segmentation fault.  The version of the 
compiler was gcc 2.3.3.  The fault line is indicated below.  If you omit the      
incrementation operator, the problem is corrected.  If I'm correct the syntax
is not faulty, even your debugger will permit to display the result. 

main()
{ char *a= "a";
  printf("%c\n",++a[0]);
}




------- End of forwarded message -------

--
Brendan Kehoe                                               brendan@cygnus.com
Cygnus Support, Mountain View, CA                              +1 415 903 1400
                     ``In a cruel and imperfect world,'' says critic Rex Reed,
 ``[Audrey Hepburn] was living proof that God could still create perfection.''
Technical Details
Message-ID: <9301262325.AA29077@cygnus.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!ferkel.ucsb.edu!taco!rock!stanford.edu!ames!sun-barr!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!cygnus.com!brendan

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!ferkel.ucsb.edu!taco!rock!stanford.edu!ames!sun-barr!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!cygnus.com!brendan
From: brendan@cygnus.com (Brendan Kehoe)
Newsgroups: gnu.gcc.bug
Subject: [cote@tesecau.iro.umontreal.ca : Problem with increment operator]
Date: 26 Jan 1993 22:25:48 -0500
Organization: GNUs Not Usenet
Lines: 34
Sender: daemon@cis.ohio-state.edu
Approved: bug-gcc@prep.ai.mit.edu
Distribution: gnu
Message-ID: <9301262325.AA29077@cygnus.com>
Reply-To: brendan@cygnus.com (Brendan Kehoe)