home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / gnu / gcc / bug / 3257 < prev    next >
Encoding:
Text File  |  1993-01-28  |  1.8 KB  |  48 lines

  1. Path: 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
  2. From: brendan@cygnus.com (Brendan Kehoe)
  3. Newsgroups: gnu.gcc.bug
  4. Subject: [cote@tesecau.iro.umontreal.ca : Problem with increment operator]
  5. Date: 26 Jan 1993 22:25:48 -0500
  6. Organization: GNUs Not Usenet
  7. Lines: 34
  8. Sender: daemon@cis.ohio-state.edu
  9. Approved: bug-gcc@prep.ai.mit.edu
  10. Distribution: gnu
  11. Message-ID: <9301262325.AA29077@cygnus.com>
  12. Reply-To: brendan@cygnus.com (Brendan Kehoe)
  13.  
  14. ------- Start of forwarded message -------
  15. From: cote@tesecau.iro.umontreal.ca (Marcel Cote)
  16. Subject: Problem with increment operator
  17. To: bug-g++@prep.ai.mit.edu
  18. Date: Fri, 22 Jan 1993 03:12:32 GMT
  19. Newsgroups: gnu.g++.bug
  20. Organization: Universite de Montreal, Canada
  21.  
  22. To whom it may concern,
  23.  
  24.     This letter is to ask if you have any information concerning a discrepancy
  25. I found while preparing data for a course.  The machine I was working on was a 
  26. Sparc II with the operating system SunOS release 4.1.3.  There are no problems for 
  27. compiling but at execution there is a segmentation fault.  The version of the 
  28. compiler was gcc 2.3.3.  The fault line is indicated below.  If you omit the      
  29. incrementation operator, the problem is corrected.  If I'm correct the syntax
  30. is not faulty, even your debugger will permit to display the result. 
  31.  
  32. main()
  33. { char *a= "a";
  34.   printf("%c\n",++a[0]);
  35. }
  36.  
  37.  
  38.  
  39.  
  40. ------- End of forwarded message -------
  41.  
  42. --
  43. Brendan Kehoe                                               brendan@cygnus.com
  44. Cygnus Support, Mountain View, CA                              +1 415 903 1400
  45.                      ``In a cruel and imperfect world,'' says critic Rex Reed,
  46.  ``[Audrey Hepburn] was living proof that God could still create perfection.''
  47.  
  48.