Using ``++int++`` is implementation-defined because bit-fields of type ``++int++`` can be either ``++signed++`` or ``++unsigned++``.


The use of ``++wchar_t++`` as a bit-field type is prohibited as ISO/IEC 14882:2003 does not explicitly define the underlying representation as ``++signed++`` or ``++unsigned++``.


== Noncompliant Code Example

----
struct S 
{ 
  char c : 2; // Noncompliant
  int i : 2; // Noncompliant
  short f : 2; // Noncompliant
  wchar_t k : 2; // Noncompliant
  signed int a : 2; // Compliant
  unsigned int b : 2; // Compliant 
  signed char d : 2; // Compliant
  unsigned char e : 2; // Compliant
  signed short g : 2; // Compliant
  unsigned short h : 2; // Compliant
  bool j : 2; // Compliant
  uint32_t l : 2; // Compliant
  int8_t m : 2; // Compliant
};
----


== See

* MISRA {cpp}:2008, 9-6-2
* ISO/IEC 14882:2003


ifdef::env-github,rspecator-view[]
'''
== Comments And Links
(visible only on this page)

include::comments-and-links.adoc[]
endif::env-github,rspecator-view[]
