* [jimc:maph 1/1] lib/test_map_h.c:25:39: error: expected ',' or ')', found "("
@ 2023-03-21 7:24 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-03-21 7:24 UTC (permalink / raw)
To: Jim Cromie; +Cc: oe-kbuild-all
tree: https://github.com/jimc/linux.git maph
head: d23ecc1b5bd07a90e9bea919ecf2c1b8e5182593
commit: d23ecc1b5bd07a90e9bea919ecf2c1b8e5182593 [1/1] include/linux/map.h: add new header, test it with test_map_h.c (RFC)
config: alpha-randconfig-r011-20230319 (https://download.01.org/0day-ci/archive/20230321/202303211534.FXXTYfTR-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/jimc/linux/commit/d23ecc1b5bd07a90e9bea919ecf2c1b8e5182593
git remote add jimc https://github.com/jimc/linux.git
git fetch --no-tags jimc maph
git checkout d23ecc1b5bd07a90e9bea919ecf2c1b8e5182593
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=alpha olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=alpha SHELL=/bin/bash lib/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202303211534.FXXTYfTR-lkp@intel.com/
All errors (new ones prefixed by >>):
>> lib/test_map_h.c:25:39: error: expected ',' or ')', found "("
25 | #define BUILD_BUG_STREQ(BUILD_BUG_ON(0))
| ^
lib/test_map_h.c: In function 'MAPH_BUILD_BUG':
>> lib/test_map_h.c:37:9: error: implicit declaration of function 'BUILD_BUG_STREQ'; did you mean 'BUILD_BUG_ON'? [-Werror=implicit-function-declaration]
37 | BUILD_BUG_STREQ(debug_cats, 0, "DRMx_CORE");
| ^~~~~~~~~~~~~~~
| BUILD_BUG_ON
>> lib/test_map_h.c:37:25: error: 'debug_cats' undeclared (first use in this function)
37 | BUILD_BUG_STREQ(debug_cats, 0, "DRMx_CORE");
| ^~~~~~~~~~
lib/test_map_h.c:37:25: note: each undeclared identifier is reported only once for each function it appears in
cc1: some warnings being treated as errors
vim +25 lib/test_map_h.c
22
23 /* ARCH=i386 has compile-time errs from this otherwize */
24 #if !defined(__i386__)
> 25 #define BUILD_BUG_STREQ(BUILD_BUG_ON(0))
26 #else
27 /* test 2 ways, for now */
28 #define BUILD_BUG_STREQ(_var, idx, ref) do { \
29 BUILD_BUG_ON(__builtin_memcmp(_var##_slist[idx], ref, sizeof(ref))); \
30 BUILD_BUG_ON(__builtin_memcmp(_var##_slist[idx], ref, __builtin_strlen(ref))); \
31 } while (0)
32 #endif
33
34 /* force compile, though its not called */
35 static void __used MAPH_BUILD_BUG(void)
36 {
> 37 BUILD_BUG_STREQ(debug_cats, 0, "DRMx_CORE");
38 BUILD_BUG_STREQ(debug_cats, 1, "DRMx_DRIVER");
39 BUILD_BUG_STREQ(debug_cats, 2, "DRMx_KMS");
40 #ifdef FORCE_FAIL
41 /* properly breaks compile */
42 BUILD_BUG_STREQ(debug_cats, 1, "'not-in-map'");
43 #endif
44 }
45
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-03-21 7:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-21 7:24 [jimc:maph 1/1] lib/test_map_h.c:25:39: error: expected ',' or ')', found "(" kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.