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

ARCMWDT: compiler generates warnings about omited function declaration #74562

Closed
kokas-a opened this issue Jun 19, 2024 · 0 comments · Fixed by #74690
Closed

ARCMWDT: compiler generates warnings about omited function declaration #74562

kokas-a opened this issue Jun 19, 2024 · 0 comments · Fixed by #74690
Assignees
Labels
area: ARC ARC Architecture bug The issue is a bug, or the PR is fixing a bug priority: medium Medium impact/importance bug

Comments

@kokas-a
Copy link

kokas-a commented Jun 19, 2024

Describe the bug
MWDT generates warnings that routine declaration of out() inside z_cbvprintf_impl() is omitted.

note
MWDT is Clang-based (LLVM 16.0.6) compiler

Please also mention any information which could help others to understand
the problem you're facing:

  • What target platform are you using - arc nsim platform with arcmwdt compiler

To Reproduce
Steps to reproduce the behavior:

  1. export ZEPHYR_TOOLCHAIN_VARIANT=arcmwdt
  2. west build -p -b nsim/nsim_em samples/hello_world
  3. See warnings in output

Expected behavior
Build system generates clean build log without warnings

Logs and console output

-- Zephyr version: 3.7.0-rc1 (/home/user/sandbox/zephyrproject/zephyr), build: v3.7.0-rc1-7-g83958eb937d2
[16/126] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/cbprintf_complete.c.obj
/home/user/sandbox/zephyrproject/zephyr/lib/os/cbprintf_complete.c:1327:15: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
 1327 |                 int rc = out((int)*sp++, ctx);
      |                             ^
/home/user/sandbox/zephyrproject/zephyr/lib/os/cbprintf_complete.c:1377:4: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
 1377 |                         OUTC(*fp++);
      |                         ^
/home/user/sandbox/zephyrproject/zephyr/lib/os/cbprintf_complete.c:1354:17: note: expanded from macro 'OUTC'
 1354 |         int rc = (*out)((int)(c), ctx); \
      |                        ^
/home/user/sandbox/zephyrproject/zephyr/lib/os/cbprintf_complete.c:1586:4: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
 1586 |                         OUTC('%');
      |                         ^
/home/user/sandbox/zephyrproject/zephyr/lib/os/cbprintf_complete.c:1354:17: note: expanded from macro 'OUTC'
 1354 |         int rc = (*out)((int)(c), ctx); \
      |                        ^
/home/user/sandbox/zephyrproject/zephyr/lib/os/cbprintf_complete.c:1760:7: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
 1760 |                                                 OUTC(sign);
      |                                                 ^
/home/user/sandbox/zephyrproject/zephyr/lib/os/cbprintf_complete.c:1354:17: note: expanded from macro 'OUTC'
 1354 |         int rc = (*out)((int)(c), ctx); \
      |                        ^
/home/user/sandbox/zephyrproject/zephyr/lib/os/cbprintf_complete.c:1767:6: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
 1767 |                                         OUTC(pad);
      |                                         ^
/home/user/sandbox/zephyrproject/zephyr/lib/os/cbprintf_complete.c:1354:17: note: expanded from macro 'OUTC'
 1354 |         int rc = (*out)((int)(c), ctx); \
      |                        ^
/home/user/sandbox/zephyrproject/zephyr/lib/os/cbprintf_complete.c:1776:4: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
 1776 |                         OUTC(sign);
      |                         ^
/home/user/sandbox/zephyrproject/zephyr/lib/os/cbprintf_complete.c:1354:17: note: expanded from macro 'OUTC'
 1354 |         int rc = (*out)((int)(c), ctx); \
      |                        ^
/home/user/sandbox/zephyrproject/zephyr/lib/os/cbprintf_complete.c:1785:6: warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
 1785 |                                         OUTC(*cp++);
      |                                         ^

Environment (please complete the following information):

  • OS: Linux
  • Toolchain: arcmwdt
  • v3.7.0-rc1-7-g83958eb937d2
@kokas-a kokas-a added the bug The issue is a bug, or the PR is fixing a bug label Jun 19, 2024
kokas-a pushed a commit to kokas-a/zephyr that referenced this issue Jun 19, 2024
MWDT requires function to be declared with argument types.
This PR provides explisitly type cast for out routine
inside z_cbvprintf_impl().

This fixes zephyrproject-rtos#74562

Signed-off-by: Nikolay Agishev <[email protected]>
@nashif nashif added the area: ARC ARC Architecture label Jun 20, 2024
@nashif nashif added the priority: medium Medium impact/importance bug label Jun 24, 2024
kokas-a pushed a commit to kokas-a/zephyr that referenced this issue Jun 26, 2024
MWDT requires function to be declared with argument types.
This PR provides explisitly type cast for out routine
inside z_cbvprintf_impl().

This fixes zephyrproject-rtos#74562

Signed-off-by: Nikolay Agishev <[email protected]>
kokas-a pushed a commit to foss-for-synopsys-dwc-arc-processors/zephyr that referenced this issue Jun 27, 2024
MWDT requires function to be declared with argument types.
This PR provides explisitly type cast for out routine
inside z_cbvprintf_impl().

This PR also actual to LLVM-based compilers with strict
rules of compilation. It covers warnings generated with
additional flag -Wincompatible-function-pointer-types-strict.

This fixes zephyrproject-rtos#74562

Signed-off-by: Nikolay Agishev <[email protected]>
@nashif nashif closed this as completed in 5d92abe Jun 28, 2024
coreboot-bot pushed a commit to coreboot/zephyr-cros that referenced this issue Jul 5, 2024
MWDT requires function to be declared with argument types.
This PR provides explisitly type cast for out routine
inside z_cbvprintf_impl().

This PR also actual to LLVM-based compilers with strict
rules of compilation. It covers warnings generated with
additional flag -Wincompatible-function-pointer-types-strict.

This fixes zephyrproject-rtos/zephyr#74562

(cherry picked from commit 5d92abe)

Original-Signed-off-by: Nikolay Agishev <[email protected]>
GitOrigin-RevId: 5d92abe
Change-Id: Ib6386c3a2b46deffe4f733ab433bf3d6979dbff6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/5669142
Reviewed-by: Eric Yilun Lin <[email protected]>
Commit-Queue: Fabio Baltieri <[email protected]>
Tested-by: ChromeOS Prod (Robot) <[email protected]>
Reviewed-by: Fabio Baltieri <[email protected]>
DashingR pushed a commit to tsisw/zephyr that referenced this issue Aug 15, 2024
MWDT requires function to be declared with argument types.
This PR provides explisitly type cast for out routine
inside z_cbvprintf_impl().

This PR also actual to LLVM-based compilers with strict
rules of compilation. It covers warnings generated with
additional flag -Wincompatible-function-pointer-types-strict.

This fixes zephyrproject-rtos#74562

Signed-off-by: Nikolay Agishev <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: ARC ARC Architecture bug The issue is a bug, or the PR is fixing a bug priority: medium Medium impact/importance bug
Projects
None yet
3 participants