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

Added example2 to Makefile after fixing it #3

Merged
merged 2 commits into from
Feb 8, 2015
Merged

Added example2 to Makefile after fixing it #3

merged 2 commits into from
Feb 8, 2015

Conversation

hellerve
Copy link
Contributor

@hellerve hellerve commented Feb 7, 2015

Hey,

I've added the second example to the Makefile. I had to include stdbool for that(in order to make false and true work).
I hope that is okay for you.

Also, PT_ASSERT("string"); fails on gcc(but works on clang) because of the definition of PT_ASSERT,
which casts the argument to int. I had to change that to PT_ASSERT("string" != NULL);.

On clang, the first example fails, because of their lack of support of nested functions, but I guess you knew that(due to your README).

Cheers

@orangeduck
Copy link
Owner

Hi hellerve,

Thanks for this! How come stdbool was required? I was hoping to keep it C89 compatible where possible. Good idea to switch to "String" != NULL though. Clang used to support nested functions in gcc mode (i.e using the gcc binary that comes with it) using the switch -fnested-functions but I guess perhaps they have disabled that now.

Thanks,

Dan

@hellerve
Copy link
Contributor Author

hellerve commented Feb 7, 2015

The stdbool requirement was because of the usage of trueand false. I could also just define them as macros, whichever you like more.

@orangeduck
Copy link
Owner

Ah yeah of course. No that is fine. Thanks again!

orangeduck added a commit that referenced this pull request Feb 8, 2015
Added example2 to Makefile after fixing it
@orangeduck orangeduck merged commit a8a6de9 into orangeduck:master Feb 8, 2015
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

Successfully merging this pull request may close these issues.

2 participants