//GCC 7.7.2 + opensuse 12.3 (linux 3.7.10) + glibc-2.17-4.4.1.x86_64 //by Ivan Skytte Jørgensen -d__lint //----------------------------------------------------------------------------- //Architecure/OS-specific -d__i386__ -d__i386 -d__linux=1 -d__linux__=1 -dlinux=1 -di386=1 // needed for some Unix's -a#machine(i386) // #assert's machine(i386) (SVR4 facility). //----------------------------------------------------------------------------- //Compiler -cgnu // Notifies FlexeLint that gcc is being used. //-fsg //old versions of flexelint enabled fsg implicitly by -cgnu. Disable it. +ppw(warning) //extra preprocessor keyword +ppw(ident) //extra preprocessor keyword //C++ header files: -i/usr/include/c++/4.7 -i/usr/include/c++/4.7/x86_64-suse-linux -i/usr/include/c++/4.7/backward -i/usr/local/include -i/usr/lib64/gcc/x86_64-suse-linux/4.7/include -i/usr/lib64/gcc/x86_64-suse-linux/4.7/include-fixed -i/usr/x86_64-suse-linux/include -i/usr/include //----------------------------------------------------------------------------- // Settings for amd64 (64-bit) -si4 // int's are typically 4 bytes -sp8 // ptr's are typically 4 bytes //compiler-generated depending on -m32|-m64 -d__x86_64=1 -d__x86_64__=1 -d__amd64=1 -d__amd64__=1 -d_LP64=1 -d__LP64__=1 -d_FILE_OFFSET_BITS=64 //shouldn't be necessary, but has weird constructs //----------------------------------------------------------------------------- //Compiler-predefined macros -d_GNU_SOURCE -d__BIGGEST_ALIGNMENT__=16 -d"__CHAR16_TYPE__=short unsigned int" -d"__CHAR32_TYPE__=unsigned int" -d"__INT16_TYPE__=short int" -d"__INT64_TYPE__=long int" -d"__INT8_TYPE__=signed char" -d"__INTPTR_TYPE__=long int" -d"__INT_FAST16_TYPE__=long int" -d"__INT_FAST32_TYPE__=long int" -d"__INT_FAST64_TYPE__=long int" -d"__INT_FAST8_TYPE__=signed char" -d"__INT_LEAST16_TYPE__=short int" -d"__INT_LEAST64_TYPE__=long int" -d"__INT_LEAST8_TYPE__=signed char" -d"__UINT16_TYPE__=short unsigned int" -d"__UINT32_TYPE__=unsigned int" -d"__UINT64_TYPE__=long unsigned int" -d"__UINT8_TYPE__=unsigned char" -d"__UINTPTR_TYPE__=long unsigned int" -d"__UINT_FAST16_TYPE__=long unsigned int" -d"__UINT_FAST32_TYPE__=long unsigned int" -d"__UINT_FAST64_TYPE__=long unsigned int" -d"__UINT_FAST8_TYPE__=unsigned char" -d"__UINT_LEAST16_TYPE__=short unsigned int" -d"__UINT_LEAST32_TYPE__=unsigned int" -d"__UINT_LEAST64_TYPE__=long unsigned int" -d"__UINT_LEAST8_TYPE__=unsigned char" -d__INTPTR_MAX__=9223372036854775807L -d__INT_FAST16_MAX__=9223372036854775807L -d__INT_FAST32_MAX__=9223372036854775807L -d__INT_FAST64_MAX__=9223372036854775807L -d__INT_FAST8_MAX__=127 -d__INT_LEAST16_MAX__=32767 -d__INT_LEAST32_MAX__=2147483647 -d__INT_LEAST32_TYPE__=int -d__INT_LEAST64_MAX__=9223372036854775807L -d__INT_LEAST8_MAX__=127 -d__UINT16_MAX__=65535 -d__UINT32_MAX__=4294967295U -d__UINT64_MAX__=18446744073709551615UL -d__UINT8_MAX__=255 -d__UINTMAX_MAX__=18446744073709551615UL -d__UINTPTR_MAX__=18446744073709551615UL -d__UINT_FAST16_MAX__=18446744073709551615UL -d__UINT_FAST32_MAX__=18446744073709551615UL -d__UINT_FAST64_MAX__=18446744073709551615UL -d__UINT_FAST8_MAX__=255 -d__UINT_LEAST16_MAX__=65535 -d__UINT_LEAST32_MAX__=4294967295U -d__UINT_LEAST64_MAX__=18446744073709551615UL -d__UINT_LEAST8_MAX__=255 -d__INT16_MAX__=32767 -d__INT32_MAX__=2147483647 -d__INT32_TYPE__=int -d__INT64_MAX__=9223372036854775807L -d__INT8_MAX__=127 -d__CHAR_BIT__=8 -d__DBL_DIG__=15 -d__DBL_HAS_DENORM__=1 -d__DBL_HAS_INFINITY__=1 -d__DBL_HAS_QUIET_NAN__=1 -d__DBL_MANT_DIG__=53 -d__DBL_MAX_10_EXP__=308 -d__DBL_MAX_EXP__=1024 -d__DEC128_EPSILON__=1E-33DL -d__DEC128_MANT_DIG__=34 -d__DEC128_MAX_EXP__=6145 -d__DEC128_MAX__=9.999999999999999999999999999999999E6144DL -d__DEC128_MIN__=1E-6143DL -d__DEC128_SUBNORMAL_MIN__=0.000000000000000000000000000000001E-6143DL -d__DEC32_EPSILON__=1E-6DF -d__DEC32_MANT_DIG__=7 -d__DEC32_MAX_EXP__=97 -d__DEC32_MAX__=9.999999E96DF -d__DEC32_MIN__=1E-95DF -d__DEC32_SUBNORMAL_MIN__=0.000001E-95DF -d__DEC64_EPSILON__=1E-15DD -d__DEC64_MANT_DIG__=16 -d__DEC64_MAX_EXP__=385 -d__DEC64_MAX__=9.999999999999999E384DD -d__DEC64_MIN__=1E-383DD -d__DEC64_SUBNORMAL_MIN__=0.000000000000001E-383DD -d__DECIMAL_BID_FORMAT__=1 -d__DECIMAL_DIG__=21 -d__DEC_EVAL_METHOD__=2 -d__DEPRECATED=1 -d__ELF__=1 -d__EXCEPTIONS=1 -d__FINITE_MATH_ONLY__=0 -d__FLT_DENORM_MIN__=1.40129846432481707092e-45F -d__FLT_DIG__=6 -d__FLT_EPSILON__=1.19209289550781250000e-7F -d__FLT_EVAL_METHOD__=0 -d__FLT_HAS_DENORM__=1 -d__FLT_HAS_INFINITY__=1 -d__FLT_HAS_QUIET_NAN__=1 -d__FLT_MANT_DIG__=24 -d__FLT_MAX_10_EXP__=38 -d__FLT_MAX_EXP__=128 -d__FLT_MAX__=3.40282346638528859812e+38F -d__FLT_MIN__=1.17549435082228750797e-38F -d__FLT_RADIX__=2 -d__GCC_HAVE_DWARF2_CFI_ASM=1 -d__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1=1 -d__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2=1 -d__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4=1 -d__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8=1 -d__GNUC_GNU_INLINE__=1 -d__GNUC_MINOR__=4 -d__GNUC_PATCHLEVEL__=0 -d__GNUC__=4 -d__GNUG__=4 -d__GXX_ABI_VERSION=1002 -d__GXX_RTTI=1 -d__GXX_WEAK__=1 -d__INTMAX_MAX__=9223372036854775807L -d"__INTMAX_TYPE__=long int" -d__INT_MAX__=2147483647 -d__LDBL_DENORM_MIN__=3.64519953188247460253e-4951L -d__LDBL_DIG__=18 -d__LDBL_EPSILON__=1.08420217248550443401e-19L -d__LDBL_HAS_DENORM__=1 -d__LDBL_HAS_INFINITY__=1 -d__LDBL_HAS_QUIET_NAN__=1 -d__LDBL_MANT_DIG__=64 -d__LDBL_MAX_10_EXP__=4932 -d__LDBL_MAX_EXP__=16384 -d__LDBL_MAX__=1.18973149535723176502e+4932L -d__LDBL_MIN__=3.36210314311209350626e-4932L -d__LONG_LONG_MAX__=9223372036854775807LL -d__LONG_MAX__=9223372036854775807L -d__MMX__=1 -d__NO_INLINE__=1 -d__PRAGMA_REDEFINE_EXTNAME=1 -d__PTRDIFF_MAX__=9223372036854775807L -d"__PTRDIFF_TYPE__=long int" -d__REGISTER_PREFIX__= -d__SCHAR_MAX__=127 -d__SHRT_MAX__=32767 -d__SIG_ATOMIC_MAX__=2147483647 -d__SIG_ATOMIC_TYPE__=int -d__SIZEOF_DOUBLE__=8 -d__SIZEOF_FLOAT__=4 -d__SIZEOF_INT__=4 -d__SIZEOF_LONG_DOUBLE__=16 -d__SIZEOF_LONG_LONG__=8 -d__SIZEOF_LONG__=8 -d__SIZEOF_POINTER__=8 -d__SIZEOF_PTRDIFF_T__=8 -d__SIZEOF_SHORT__=2 -d__SIZEOF_SIZE_T__=8 -d__SIZEOF_WCHAR_T__=4 -d__SIZEOF_WINT_T__=4 -d__SIZE_MAX__=18446744073709551615UL -d"__SIZE_TYPE__=long unsigned int" -d__SSE2_MATH__=1 -d__SSE2__=1 -d__SSE_MATH__=1 -d__SSE__=1 -d__STDC_HOSTED__=1 -d__STDC__=1 -d"__UINTMAX_TYPE__=long unsigned int" -d__USER_LABEL_PREFIX__= -d"__VERSION__=4.5.1" -d__WCHAR_MAX__=2147483647 -d__WCHAR_TYPE__=int -d"__WINT_TYPE__=unsigned int" -d__WINT_MAX__=4294967295U -d__WINT_MIN__=0U -d__gnu_linux__=1 -d__k8=1 -d__k8__=1 -d__unix=1 -d__unix__=1 -dunix=1 //----------------------------------------------------------------------------- // Settings for header files + compiler -wlib(1) // sets the warning level within library headers to 1 // (no warnings, just syntax errors). Comment out if you // are actually linting library headers. This // option makes obsolete options of the form -elib(axxx) where // xxx >= 400 which may be retained for historical reasons. -elib(537) //Repeated include file -elib(760) //Redundant macro 'xxxx' defined identically at same file location -elib(451) //Header file '/usr/include/bits/wordsize.h' repeatedly included but does not have a standard include guard -elib(620) //Suspicious constant (L or one?) -elib(652) //#define of symbol 'xxxxx' declared previously at location yyyy -elib(659) //Nothing follows '}' on line terminating struct/union/enum definition -elib(778) //Constant expression evaluates to 0 in operation '-' -elib(1501) //data member 'aiocb::__pad' has zero size -elib(849) //Symbol 'xxxx' has same enumerator value 'yyyy' as enumerator 'zzzz' -elib(834) //Operator '-' followed by operator '-' is confusing. Use parentheses. -elib(773) //Expression-like macro 'xxxx' not parenthesized -elib(572) //Excessive shift value (precision xxxx shifted right by yyyy) -elib(726) //Extraneous comma ignored -elib(835) //A zero has been given as right argument to operator '<<' -elib(762) //Redundantly declared symbol 'xxxx' previously declared at line yyyy -elib(828) //Semantics of function 'setjmp' copied to function '_setjmp' -elib(683) //function 'xxxx' #define'd, semantics may be lost -elib(763) //Redundant declaration for symbol 'xxxx' previously declared at line yyyy, file zzzz //gcc builtins and extensions -d__attribute__()= // ignore this keyword and following parenthetical -d__extension__= // ignore this keyword +rw(__restrict) // ignore this keyword. +rw(restrict) // ignore this keyword. +rw(__inline) // ignore this keyword -d__const=const // gconv.h/fcntl.h uses __const rather than const -d__signed=signed -d__volatile=volatile -d__signed__=signed -d__builtin_va_list=void* // used by stdarg.h -d__builtin_va_start(l,p)=(l=(void*)&p) -d__builtin_va_arg(l,type)=((type)l) -d__builtin_va_end(l)= -d__builtin_va_copy(dst,src)=((dst)=(src)) +d__builtin_offsetof(,)=8 //8 is good enough and avoid pointer gymnastics +d__builtin_clz()=1 +d__builtin_clzl()=1 +d__builtin_clzll()=1 //builtin_vsnprintf is nasty -header(/opt/FlexeLint_v9k/builtin_vsnprintf) -esym(762,__builtin_vsnprintf,std::__builtin_vsnprintf) -esym(526,__builtin_vsnprintf,std::__builtin_vsnprintf) -esym(757,__builtin_vsnprintf,std::__builtin_vsnprintf) //support for assert(): -sem(__assert_fail,r_no) -d__func__="somefunction" -d__PRETTY_FUNCTION__="somefunction" +rw(__typeof__) // activate __typeof__ keyword -d__typeof=__typeof__ // an alternative to using __typeof__ +rw(*type_traits) //gcc 4.3+ stl uses gcc builtins //glibc weak symbol stuff +u__GXX_WEAK__ // doesn't check for unix98 flag and just does 'using ::fwide', etc. //-estring(40,fwide,fwprintf,fwscanf,swprintf,swscanf) //-estring(40,vfwprintf,vfwscanf,vswprintf,vswscanf,vwprintf) //-estring(40,vwscanf,wcstof,wprintf,wscanf,wcstold) //-estring(40,wcstoll,wcstoull,wcstold,wcstoll,wcstoull) //-estring(40,vfscanf,vscanf,vsscanf,vfscanf,vscanf,vsscanf) // linux's sys/types.h uses ugly __mode__ attributes to specify width of int8/16/32/64_t types // workaround: assume that only sys/types.h uses the macros __intN_t/__u_intN_t to do this. override and freeze them +d"__intN_t(,)=typedef char int8_t; typedef short int16_t; typedef int int32_t; typedef long int64_t" +d"__u_intN_t(,)=typedef unsigned char u_int8_t; typedef unsigned short u_int16_t; typedef unsigned u_int32_t; typedef unsigned long u_int64_t" //Johan Bezem's alternative solution: //-dMY_INT8=char //-dMY_INT16=short //-dMY_INT32=int //-dMY_INT64=long //++d"__intN_t(n,m)=typedef MY_INT##n int##n##_t" //Some header files do not have standard include guards -estring(451,stddef.h,time.h,stdio.h,limits.h,stdarg.h,signal.h,stdlib.h) //SOCK_STREAM/SOCK_DGRAM/... are enumerations. There is nothing weird about implicit conversion to int -esym(641,__socket_type) //The definition of UINT64_MAX causes warnings 694 and 417 -emacro(694,UINT64_MAX) -emacro(417,UINT64_MAX) //fd_set macros have their own set of problems, mostly due to file descriptors normally being 'int' but implicitly assumed non-negative -emacro(717,FD_ZERO) //do ... while(0); -emacro(703,FD_SET,FD_CLR,FD_ISSET) //Shift left of signed quantity (long) -emacro(502,FD_CLR) //Expected unsigned type -emacro(573,FD_SET,FD_CLR,FD_ISSET) //Signed-unsigned mix with divide -emacro(737,FD_SET,FD_CLR,FD_ISSET) //Loss of sign in promotion from int to unsigned long // -emacro(740,IN6_IS_ADDR_V4MAPPED) //Unusual pointer cast (incompatible indirect types) -emacro(708,PTHREAD_COND_INITIALIZER) //union initialization -emacro(708,PTHREAD_MUTEX_INITIALIZER) //union initialization -emacro(708,PTHREAD_RWLOCK_INITIALIZER) //union initialization //avoid info 1702 (both member and ordinary) -estring(1702,*__gnu_cxx*iterator*) //map iterators are never null -sem(std::_Rb_tree_iterator::operator->,@p) //std::string.c_str() never returns null -sem(std::basic_string::c_str,@p) //std::vector begin/end are never null -sem(__gnu_cxx::__normal_iterator::operator->,@p) //-d__asm__=_to_semi //+rw(_to_semi) -d__asm()=_to_semi; +rw(_to_semi) +d__sync_fetch_and_add(ptr,blarg)=(*(ptr)) //byteswap.h + bits/byteswap.h needs some force ++d_BYTESWAP_H=1 ++dbswap_16(x)=(x) ++dbswap_32(x)=(x) ++dbswap_64(x)=(x) ++d__builtin_constant_p()=0 -scanf_code(hhd,char) -scanf_code(hhi,char) -scanf_code(hhu,unsigned char)