Liste des Groupes | Revenir à c theory |
[ Followup-To: set ]*I have fully operational code, yet this is*
In comp.theory olcott <polcott333@gmail.com> wrote:
[ .... ]
I've tried out your much spammed code on GCC (see below). It is clear
you have never built or run this code, which ironically can't reach Line
06. It can't even reach line 00.
Richard tried to get away with D never simulated by H as an example
of D simulated by H:Message-ID: <v0ummt$2qov3$2@i2pn2.org>
On 5/1/2024 7:28 PM, Richard Damon wrote:*That people say they know I am wrong yet will not show the detailed*You have said, or at least implied that your code fragment is runnable.
*steps of how I am wrong indicates that they are probably liars*
I think you are the liar, here.
00 int H(ptr x, ptr x) // ptr is pointer to int functionI removed the line numbers from your code, added in a "pointer to int
01 int D(ptr x)
02 {
03 int Halt_Status = H(x, x);
04 if (Halt_Status)
05 HERE: goto HERE;
06 return Halt_Status;
07 }
08
09 int main()
10 {
11 H(D,D);
12 }
function" type (you should really learn how to do this yourself) and ran
the result on GCC.
This is the file I submitted:
typedef int (* ptr) (void);
int H(ptr x, ptr x) // ptr is pointer to int function
int D(ptr x)
{
int Halt_Status = H(x, x);
if (Halt_Status)
HERE: goto HERE;
return Halt_Status;
}
int main()
{
H(D,D);
}
. These are the diagnostics generated by GCC:
olcott.c:2:18: error: redefinition of parameter ‘x’
2 | int H(ptr x, ptr x) // ptr is pointer to int function
| ~~~~^
olcott.c:2:11: note: previous definition of ‘x’ with type ‘ptr’ {aka ‘int
(*)(void)’}
2 | int H(ptr x, ptr x) // ptr is pointer to int function
| ~~~~^
olcott.c: In function ‘H’:
olcott.c:4:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘{’ token
4 | {
| ^
olcott.c:12:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘{’ token
12 | {
| ^
olcott.c:15: error: expected ‘{’ at end of input
Any H/D pair matching the above template where D(D) is simulatedThe code for D is so full of errors that it cannot demonstrate anything,
by the same H(D,D) that it calls cannot possibly reach past its own
line 03. Simple software engineering verified fact.
beyond a lack of proficiency in C in its author.
Les messages affichés proviennent d'usenet.