This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/47151] New: Parsing error
- From: "chaturvedi.kuldeep at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 2 Jan 2011 12:00:50 +0000
- Subject: [Bug c++/47151] New: Parsing error
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47151
Summary: Parsing error
Product: gcc
Version: 4.4.3
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: chaturvedi.kuldeep@gmail.com
Created attachment 22880
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22880
The revstr.ii file that contains the complete code which the g++ compiler has
generated
I have created a recursive function but forgot to place a semi-colon at the end
of return statement. The compiler, in fact, did not raise any syntactical
errors.
Here is the fragment of the code.
void revstr_recursive(char * str, int start, int end) {
if (start < end)
revstr_recursive(str, start + 1, end - 1);
else
return
swap(str[start], str[end]);
}