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 #1365, fixup API headers for C++ #1371

Merged
merged 1 commit into from
Mar 2, 2023

Conversation

jphickey
Copy link
Contributor

Checklist (Please check before submitting)

Describe the contribution
Correct a few syntactical items that are valid C99 but not valid for C++03. This includes use of the designated initializer, compound literals, variadic macros, and a trailing comma in enum declarations.

Note this only matters for public API headers, as some users may need to include these directly from a c++ file. For normal C source files, these are all compiled as C99 and thus the syntax is fine.

Fixes #1365

Testing performed
Build and run all OSAL tests

Expected behavior changes
No impact to behavior, headers are now valid syntax for C++03 (and C99, of course)

System(s) tested on
Debian (using g++ 12.2 to check C++ syntax)

Contributor Info - All information REQUIRED for consideration of pull request
Joseph Hickey, Vantage Systems, Inc.

Correct a few syntactical items that are valid C99 but not valid for
C++03.  This includes use of the designated initializer, compound
literals, variadic macros, and a trailing comma in enum declarations.

Note this only matters for public API headers, as some users may need to
include these directly from a c++ file.  For normal C source files, these
are all compiled as C99 and thus the syntax is fine.
@dzbaker dzbaker added the CCB:Approved Indicates code review and approval by community CCB label Mar 2, 2023
dzbaker added a commit to nasa/cFS that referenced this pull request Mar 2, 2023
*Combines:*

osal v6.0.0-rc4+dev205

**Includes:**

*osal*
- nasa/osal#1371
- nasa/osal#1372

Co-authored by: Joseph Hickey <jphickey@users.noreply.github.com>
@dzbaker dzbaker merged commit a776f69 into nasa:main Mar 2, 2023
dzbaker added a commit to nasa/cFS that referenced this pull request Mar 2, 2023
*Combines:*

osal v6.0.0-rc4+dev205

**Includes:**

*osal*
- nasa/osal#1371
- nasa/osal#1372

Co-authored by: Joseph Hickey <jphickey@users.noreply.github.com>
@jphickey jphickey deleted the fix-1365-cpp-compat branch March 14, 2023 13:34
@dmknutsen dmknutsen added this to the Equuleus milestone May 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CCB:Approved Indicates code review and approval by community CCB enhancement Equuleus-rc1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Designated initializer in osapi-clock.h header breaks C++ compilation unit.
4 participants