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

CondTools/Ecal: drop VLA of non-POD type #7238

Merged
merged 1 commit into from Jan 21, 2015

Conversation

davidlt
Copy link
Contributor

@davidlt davidlt commented Jan 16, 2015

This is required for Clang. This GCC and C99 extension is not allowed in
C++. Clang has only minimal support.

From Clang documentation:

The element type of a variable length array must be a POD ("plain old
data") type, which means that it cannot have any user-declared
constructors or destructors, any base classes, or any members of non-POD
type. All C types are POD types.

The patch replaces non-POD VLAs with std::vector with default-inserted
std::string instances.

We also could create an array in heap. That would work also.

Please review and test the changes.

Signed-off-by: David Abdurachmanov David.Abdurachmanov@cern.ch

This is required for Clang. This GCC and C99 extension is not allowed in
C++. Clang has only minimal support.

From Clang documentation:

    The element type of a variable length array must be a POD ("plain old
    data") type, which means that it cannot have any user-declared
    constructors or destructors, any base classes, or any members of non-POD
    type. All C types are POD types.

The patch replaces non-POD VLAs with std::vector with default-inserted
std::string instances.

Signed-off-by: David Abdurachmanov <David.Abdurachmanov@cern.ch>
@cmsbuild
Copy link
Contributor

A new Pull Request was created by @davidlt for CMSSW_7_4_X.

CondTools/Ecal: drop VLA of non-POD type

It involves the following packages:

CondTools/Ecal

@ggovi, @cmsbuild, @apfeiffer1, @nclopezo can you please review it and eventually sign? Thanks.
@argiro this is something you requested to watch as well.
You can sign-off by replying to this message having '+1' in the first line of your reply.
You can reject by replying to this message having '-1' in the first line of your reply.
If you are a L2 or a release manager you can ask for tests by saying 'please test' in the first line of a comment.

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

@ggovi
Copy link
Contributor

ggovi commented Jan 21, 2015

+1

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next CMSSW_7_4_X IBs unless changes (tests are also fine). This pull request will be automatically merged.

cmsbuild added a commit that referenced this pull request Jan 21, 2015
CondTools/Ecal: drop VLA of non-POD type
@cmsbuild cmsbuild merged commit 77749df into cms-sw:CMSSW_7_4_X Jan 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants