Skip to content

#ifndef #define pattern - don't generate const #346

Open
@dcharkes

Description

  #ifndef __GNUC_VA_LIST
  #define __GNUC_VA_LIST
! #if defined(__svr4__) || defined(_AIX) || defined(_M_UNIX) || defined(__NetBSD__)
! typedef char *__gnuc_va_list;
! #else
! typedef void *__gnuc_va_list;
! #endif
  #endif

This generates a const int __GNUC_VA_LIST = 1;.

The const is meaningless here, because it's never used as integer.

Workaround:

macros:
  exclude:
    - __GNUC_VA_LIST

Could we detect this pattern?

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions