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

Is --float broken? #172

Open
pmatos opened this issue Jun 28, 2024 · 4 comments
Open

Is --float broken? #172

pmatos opened this issue Jun 28, 2024 · 4 comments

Comments

@pmatos
Copy link

pmatos commented Jun 28, 2024

If I generate a program with --float using cmith 2.4.0, and then compile with gcc 14.1.1, I see that we are passing float * to transparent_crc_bytes as first argumnet which should have type char *. GCC definitely does not like that.

Attaching csmith generated file.
test1.c.gz

test1.c:1617:28: error: passing argument 1 of ‘transparent_crc_bytes’ from incompatible pointer type [-Wincompatible-pointer-types]
 1617 |     transparent_crc_bytes (&g_2320, sizeof(g_2320), "g_2320", print_hash_value);
      |                            ^~~~~~~
      |                            |
      |                            const float *
@pmatos
Copy link
Author

pmatos commented Aug 2, 2024

ping. @eeide are you still working on this?

@pmatos
Copy link
Author

pmatos commented Aug 2, 2024

Same as #129
Interestingly clang happily compiles it as seen in #135

@eeide
Copy link
Member

eeide commented Aug 2, 2024

Hi, @pmatos! I personally haven't made any substantive code changes to Csmith in a long time.

The most recent changes to Csmith have been from people offering patches through pull requests. A patch for the issue you pointed out would be most welcome!

@pmatos
Copy link
Author

pmatos commented Aug 2, 2024

Hi, @pmatos! I personally haven't made any substantive code changes to Csmith in a long time.

The most recent changes to Csmith have been from people offering patches through pull requests. A patch for the issue you pointed out would be most welcome!

I see. Thanks for the quick reply.

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

No branches or pull requests

2 participants