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

fix(cpp1): contract check invalid alternative #491

Closed

Conversation

JohelEGP
Copy link
Contributor

@JohelEGP JohelEGP commented Jun 3, 2023

Resolves #433.

I have some simplifications in store.
They might come in further commits,
because according to #433 (comment),
they might not work.

Testing summary.
100% tests passed, 0 tests failed out of 508

Total Test time (real) = 111.30 sec
Acknowledgements.

@JohelEGP
Copy link
Contributor Author

JohelEGP commented Jun 3, 2023

You can see the generated code executing at: https://cpp2.godbolt.org/z/8Kvdhc6aG.

@JohelEGP

This comment was marked as resolved.

@JohelEGP

This comment was marked as duplicate.

@JohelEGP

This comment was marked as duplicate.

@JohelEGP

This comment was marked as duplicate.

@JohelEGP

This comment was marked as duplicate.

@JohelEGP

This comment was marked as duplicate.

@JohelEGP

This comment was marked as resolved.

@JohelEGP
Copy link
Contributor Author

JohelEGP commented Jun 4, 2023

Feel free to merge this until someone resolves #492 to move the logic to compile-time.

@JohelEGP
Copy link
Contributor Author

JohelEGP commented Jun 6, 2023

This is the diff between gcc-10 and gcc-13 under test-results:

# test-results]$
for f in `ls gcc-10/* gcc-13/* | sed 's/gcc-[[:digit:]]\+\///' | sort --unique`; do diff gcc-10/$f gcc-13/$f; done
1,2c1,2
< g++-10 (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0
< Copyright (C) 2020 Free Software Foundation, Inc.
---
> c++ (GCC) 13.1.1 20230429
> Copyright (C) 2023 Free Software Foundation, Inc.
diff: gcc-10/pure2-bugfix-for-runtime-invalid-alternative.cpp.execution: No such file or directory
diff: gcc-10/pure2-bugfix-for-runtime-invalid-alternative.cpp.output: No such file or directory
diff: gcc-13/pure2-cpp1-multitoken-fundamental-types.cpp.execution: No such file or directory
diff: gcc-13/pure2-inspect-values.cpp.execution: No such file or directory
diff: gcc-13/run-tests-gcc-10.sh: No such file or directory

pure2-cpp1-multitoken-fundamental-types is now an -error test.
pure2-inspect-values is now mixed-inspect-values.

For convenience, I think a result of a newer compiler versions should only be in the repository if it is different from the previous compiler version.

@JohelEGP JohelEGP force-pushed the runtime_check_invalid_alternative branch from f6c844b to 095edee Compare June 6, 2023 16:43
@JohelEGP JohelEGP marked this pull request as draft August 11, 2023 04:49
@JohelEGP
Copy link
Contributor Author

JohelEGP commented Aug 11, 2023

Marking as draft to prevent merging
as this should be superseded by #529.

@JohelEGP
Copy link
Contributor Author

JohelEGP commented Sep 5, 2023

Feel free to merge this until someone resolves #492 to move the logic to compile-time.

[...] this should be superseded by #529.

@JohelEGP JohelEGP closed this Sep 5, 2023
@JohelEGP JohelEGP deleted the runtime_check_invalid_alternative branch September 5, 2023 15:39
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.

[BUG] Malformed lambda call inside inspect lead to compilation without error and silent default value
1 participant