# HG changeset patch # User Nobuyasu Oshiro # Date 1339687451 -32400 # Node ID 68d2c32f74cfc9f2df5eae080880a1134906636d # Parent 66931f63db4dd01713ca600730efc8b6db119cac modify explanation of rectype syntax diff -r 66931f63db4d -r 68d2c32f74cf paper/rectype.ind --- a/paper/rectype.ind Thu Jun 14 23:45:05 2012 +0900 +++ b/paper/rectype.ind Fri Jun 15 00:24:11 2012 +0900 @@ -188,22 +188,28 @@ goto p(csB); } +p is next pointer of codesegment. But, This declarationd is not right. Because p have arguments. -p - +We wanted to the same type of p's arguments as type of csA's arguments. +Right declaration is as follows. - - __code csA( __code (*p)( __code (*)( __code (*)( __code )))) { + __code csA( __code (*p)( __code (*)( __code (*)( __code *)))) { goto p(csB); } - - +The syntax of C Must be declared recursively. +The following declaration if it may be that the type checking of p. -We implemented \rectype syntax in CbC on GCC. + __code csA( __code (*p)( __code )) { + goto p(csB); + } + +However this declaration is long. +Therefore we implemented \rectype syntax in CbC on GCC. + \rectype syntax is declare a recursive type. -This example is using \rectype in CbC. +This example is using \rectype syntax. __code csA( __rectype *p) { goto p(csB); @@ -212,8 +218,6 @@ *p represent pointer of csA at \ref{code:rectype} . p's argument type is same csA that function pointer. -Recursive type Can not declarated in C. -Because