Skip to content

ARCMWDT: compiler generates warnings about omited function declaration #74562

@kokas-a

Description

@kokas-a

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

Metadata

Metadata

Assignees

Labels

area: ARCARC ArchitecturebugThe issue is a bug, or the PR is fixing a bugpriority: mediumMedium impact/importance bug

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions