Skip to main content
added 58 characters in body
Source Link
Pendyala
  • 765
  • 1
  • 9
  • 21

Clang header file intrin.h declares the _BitScanForward as below.

static unsigned char _BitScanForward(unsigned long *_Index, unsigned long _Mask); 

When I include this header file and compile the source file, it is giving compilation error like below

error: inline function '_BitScanForward' is not defined [-Werror,-Wundefined-inline] _BitScanForward ( 

This is happening only in our code base but I am unable to reproduce this compilation error outside our environment.

Could somebody please explain what is this "-Wundefined-inline" mean?

Why is the question of "inline" coming into picture?

More Info: When put inline keyword just after static, its compiling without any issues

Clang header file intrin.h declares the _BitScanForward as below.

static unsigned char _BitScanForward(unsigned long *_Index, unsigned long _Mask); 

When I include this header file and compile the source file, it is giving compilation error like below

error: inline function '_BitScanForward' is not defined [-Werror,-Wundefined-inline] _BitScanForward ( 

This is happening only in our code base but I am unable to reproduce this compilation error outside our environment.

Could somebody please explain what is this "-Wundefined-inline" mean?

More Info: When put inline keyword just after static, its compiling without any issues

Clang header file intrin.h declares the _BitScanForward as below.

static unsigned char _BitScanForward(unsigned long *_Index, unsigned long _Mask); 

When I include this header file and compile the source file, it is giving compilation error like below

error: inline function '_BitScanForward' is not defined [-Werror,-Wundefined-inline] _BitScanForward ( 

This is happening only in our code base but I am unable to reproduce this compilation error outside our environment.

Could somebody please explain what is this "-Wundefined-inline" mean?

Why is the question of "inline" coming into picture?

More Info: When put inline keyword just after static, its compiling without any issues

Source Link
Pendyala
  • 765
  • 1
  • 9
  • 21

what does -Werror,-Wundefined-inline mean?

Clang header file intrin.h declares the _BitScanForward as below.

static unsigned char _BitScanForward(unsigned long *_Index, unsigned long _Mask); 

When I include this header file and compile the source file, it is giving compilation error like below

error: inline function '_BitScanForward' is not defined [-Werror,-Wundefined-inline] _BitScanForward ( 

This is happening only in our code base but I am unable to reproduce this compilation error outside our environment.

Could somebody please explain what is this "-Wundefined-inline" mean?

More Info: When put inline keyword just after static, its compiling without any issues