Thread View: gnu.g++.bug
1 messages
1 total messages
Started by Marcel Cote
Sat, 23 Jan 1993 02:08
Problem with increment operator
Author: Marcel Cote
Date: Sat, 23 Jan 1993 02:08
Date: Sat, 23 Jan 1993 02:08
14 lines
1116 bytes
1116 bytes
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]);
}
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads