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

cat: fix compile-time error #145

Merged

Conversation

dbarry9
Copy link
Contributor

@dbarry9 dbarry9 commented Dec 19, 2023

On some older versions of GCC (10.3.0), not having at least a 'break' in a switch-case statement can yield the compiler warning: "label at end of compound statement"

These changes fix this error and have been tested on the AMD Zen3 architecture.

Pull Request Description

Author Checklist

  • Description
    Why this PR exists. Reference all relevant information, including background, issues, test failures, etc
  • Commits
    Commits are self contained and only do one thing
    Commits have a header of the form: module: short description
    Commits have a body (whenever relevant) containing a detailed description of the addressed problem and its solution
  • Tests
    The PR needs to pass all the tests

@dbarry9 dbarry9 requested review from gcongiu and adanalis December 19, 2023 22:40
@@ -832,6 +832,7 @@ void exec_flops( int precision, int EventSet, FILE *fp ) {
#endif
break;
default:
break;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should not be any need for break in default

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I use an empty statement instead; as in, just a semicolon?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes that would also work.

@dbarry9 dbarry9 force-pushed the 2023.12.19_cat-flops-compiler-error branch from 34d0b23 to 228a272 Compare December 20, 2023 14:42
On some older versions of GCC (10.3.0), not having a statement after
'default' in a switch-case statement can yield the compiler warning:
"label at end of compound statement"

These changes fix this error and have been tested on the AMD Zen3
architecture.
@gcongiu gcongiu force-pushed the 2023.12.19_cat-flops-compiler-error branch from 228a272 to 13a589b Compare December 20, 2023 14:43
@gcongiu gcongiu merged commit 90c9d41 into icl-utk-edu:master Dec 20, 2023
9 checks passed
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