Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot use cnip to complete the missing code, and cnip test.c produces no output. #155

Open
guye opened this issue Nov 1, 2024 · 2 comments
Labels

Comments

@guye
Copy link

guye commented Nov 1, 2024

Description
Using cnip test.c produces no output. The content of test.c is as follows:
int main()
{
T a = 0;
T->value = 3.14;
T->next = a;
return 0;
}

Version
(e0e6e05)

Expected behavior
Output the completed code.

@guye guye added the bug label Nov 1, 2024
@pronesto
Copy link

pronesto commented Nov 1, 2024

Hi!

Using psyche-c's online interface I get:

#define NULL ((void*)0)
typedef unsigned long size_t;  // Customize by platform.
typedef long intptr_t; typedef unsigned long uintptr_t;
typedef long scalar_t__;  // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */
typedef  struct TYPE_2__   TYPE_1__ ;

/* Type definitions */
struct TYPE_2__ {double value; int /*<<< orphan*/  next; } ;
typedef  int /*<<< orphan*/  T ;

/* Variables and functions */
 TYPE_1__* T ; 


//-------------------------
int main()
{
T a = 0;
T->value = 3.14;
T->next = a;
return 0;
}

Is cnip working at all in your environment? Do you see any error message?

@ltcmelo
Copy link
Owner

ltcmelo commented Nov 2, 2024

@guye for type inference you should use the reconstruct.py script from the original branch (as in this screenshot from the README).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants