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

Armcc5 compilation fixes #10900

Merged
merged 2 commits into from Jul 1, 2019

Conversation

@TeroJaasko
Copy link
Contributor

commented Jun 26, 2019

Description

ARMC5 build was broken on debug profile. While waiting builds to finish, fixed also few warnings caused by Nanostack.h.

Pull request type

[x] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

Reviewers

Release Notes

ARMCC reminds of the missing virtual declaration of call_in in the
Nanostack.h.

Warnings silenced:
---8<---8<---
Compile [ 52.3%]: LoWPANNDInterface.cpp
[Warning] Nanostack.h@278,0:  #1300-D: call_in inherits implicit virtual
Compile [ 52.4%]: NanostackEMACInterface.cpp
[Warning] Nanostack.h@278,0:  #1300-D: call_in inherits implicit virtual
Compile [ 52.5%]: MeshInterfaceNanostack.cpp
[Warning] Nanostack.h@278,0:  #1300-D: call_in inherits implicit virtual
Compile [ 52.6%]: NanostackEthernetInterface.cpp
[Warning] Nanostack.h@278,0:  #1300-D: call_in inherits implicit virtual
Compile [ 52.7%]: ThreadInterface.cpp
[Warning] Nanostack.h@278,0:  #1300-D: call_in inherits implicit virtual
ompile [ 53.0%]: WisunInterface.cpp
[Warning] Nanostack.h@278,0:  #1300-D: call_in inherits implicit virtual
@ciarmcom ciarmcom requested review from ARMmbed/mbed-os-maintainers Jun 26, 2019
@ciarmcom

This comment has been minimized.

Copy link
Member

commented Jun 26, 2019

#include "Callback.h"
#include <cstdarg>

#include <stdarg.h>

This comment has been minimized.

Copy link
@kjbracey-arm

kjbracey-arm Jun 26, 2019

Contributor

I'd be inclined to fix this the other way and turn va_list into std:;va_list, unless <cstdarg> itself is broken.

This comment has been minimized.

Copy link
@TeroJaasko

TeroJaasko Jun 26, 2019

Author Contributor

Fair enough. Changed back the <cstdarg> and converted va_list to std::va_list.
Anyway, what itches my nerves is that the compilation fails only on debug profile. Is someone leaking a using namespace std; from a #if _DEBUG block or what is going on there?

ARMC5 failed to compile the code with debug-profile (!!) as va_list
is getting into std:: namespace when one includes <cstdarg>. Other
compilers seem to be more relaxed, and so is ARMC5 if compiled
with other profiles.

Add the explicit std:: to references of va_list.

While here, remove one extra copy of "#include "PlatformMutex.h""
and a "#include <stdarg.h>" which is kind of duplicate of
"#include <cstdarg>".

Error being fixed:
--8<--8<--8<--
Compile [ 81.8%]: ATHandler.cpp
[Error] ATHandler.h@552,0:  #20: identifier "va_list" is undefined
[Error] ATHandler.cpp@1226,0:  #147: declaration is incompatible with "void mbed::ATHandler::handle_args(const char *, <error-type>)"  (declared at line 552 of "./mbed-os/features/cellular/framework/AT/ATHandler.h")
[ERROR] "./mbed-os/features/cellular/framework/AT/ATHandler.h", line 552: Error:  #20: identifier "va_list" is undefined
"./mbed-os/features/cellular/framework/AT/ATHandler.cpp", line 1226: Error:  #147: declaration is incompatible with "void mbed::ATHandler::handle_args(const char *, <error-type>)"  (declared at line 552 of "./mbed-os/features/cellular/framework/AT/ATHandler.h")
./mbed-os/features/cellular/framework/AT/ATHandler.cpp: 0 warnings, 2 errors
@TeroJaasko TeroJaasko force-pushed the TeroJaasko:armcc5_compilation_fixes branch from e391908 to bae3043 Jun 26, 2019
@0xc0170 0xc0170 added needs: CI and removed needs: review labels Jun 28, 2019
@0xc0170

This comment has been minimized.

Copy link
Member

commented Jun 28, 2019

CI started

@mbed-ci

This comment has been minimized.

Copy link

commented Jun 28, 2019

Test run: SUCCESS

Summary: 11 of 11 test jobs passed
Build number : 1
Build artifacts

@0xc0170 0xc0170 merged commit 6be510d into ARMmbed:master Jul 1, 2019
26 checks passed
26 checks passed
continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
jenkins-ci/build-ARM Success
Details
jenkins-ci/build-GCC_ARM Success
Details
jenkins-ci/build-IAR Success
Details
jenkins-ci/cloud-client-test Success
Details
jenkins-ci/dynamic-memory-usage RTOS ROM(-96 bytes) RAM(+0 bytes)
Details
jenkins-ci/exporter Success
Details
jenkins-ci/greentea-test Success
Details
jenkins-ci/mbed2-build-ARM Success
Details
jenkins-ci/mbed2-build-GCC_ARM Success
Details
jenkins-ci/mbed2-build-IAR Success
Details
jenkins-ci/unittests Success
Details
travis-ci/astyle Success!
Details
travis-ci/docs Success!
Details
travis-ci/doxy-spellcheck Success!
Details
travis-ci/events Success! Runtime is 8573 cycles.
Details
travis-ci/gitattributestest Success!
Details
travis-ci/include_check Success!
Details
travis-ci/licence_check Success!
Details
travis-ci/littlefs Success! Code size is 8448B.
Details
travis-ci/psa-autogen Success!
Details
travis-ci/tools-py2.7 Success!
Details
travis-ci/tools-py3.5 Success!
Details
travis-ci/tools-py3.6 Success!
Details
travis-ci/tools-py3.7 Success!
Details
@0xc0170 0xc0170 removed the ready for merge label Jul 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.