[previous] 0611 [next] [L] Nesting of 'struct' or 'union' types exceeds 15 - program does not conform strictly to ISO:C90.
ISO C90 Conformance limits REFERENCE - ISO:C90-5.2.4.1 Translation Limits

The translation limits specified in the ISO:C Standard define a minimum set of conditions which a compiler must support in order to be described as conforming. In practice, compilers will often tolerate code which exceeds these minimal requirements. However, in order to ensure portability, it is advisable to avoid writing code that assumes a level of compiler capability which may not always be supported.

Message 0611 identifies a struct or union declaration which contains more than 15 levels of nested structs or unions, the minimum requirement of the ISO:C90 Standard. Message 0392 identifies code which breaches the corresponding ISO:C99 limit, i.e. 63 nested levels. These messages do not identify incorrect code but code which is described in the respective standard as not strictly conforming.

For example:


/*PRQA S 750,759,1314,2017,2209,3211,3408,3460 ++*/

#define AGG1 struct
#define AGG2 union

AGG2 F01 { int x01;
 AGG1 F02 { int x02;
  AGG2 F03 { int x03;
   AGG1 F04 { int x04;
    AGG2 F05 { int x05;
     AGG1 F06 { int x06;
      AGG2 F07 { int x07;
       AGG1 F08 { int x08;
        AGG2 F09 { int x09;
         AGG1 F10 { int x10;
          AGG2 F11 { int x11;
           AGG1 F12 { int x12;
            AGG2 F13 { int x13;
             AGG1 F14 { int x14;
              AGG2 F15 { int x15;
               AGG1 F16 { int x16;                                                       /* Message 0611 */
                AGG2 F17 { int x17;
                 AGG1 F18 { int x18;
                  AGG2 F19 { int x19;
                   AGG1 F20 { int x20;
                    AGG2 F21 { int x21;
                     AGG1 F22 { int x22;
                      AGG2 F23 { int x23;
                       AGG1 F24 { int x24;
                        AGG2 F25 { int x25;
                         AGG1 F26 { int x26;
                          AGG2 F27 { int x27;
                           AGG1 F28 { int x28;
                            AGG2 F29 { int x29;
                             AGG1 F30 { int x30;
                              AGG2 F31 { int x31;
                               AGG1 F32 { int x32;
                                AGG2 F33 { int x33;
                                 AGG1 F34 { int x34;
                                  AGG2 F35 { int x35;
                                   AGG1 F36 { int x36;
                                    AGG2 F37 { int x37;
                                     AGG1 F38 { int x38;
                                      AGG2 F39 { int x39;
                                       AGG1 F40 { int x40;
                                        AGG2 F41 { int x41;
                                         AGG1 F42 { int x42;
                                          AGG2 F43 { int x43;
                                           AGG1 F44 { int x44;
                                            AGG2 F45 { int x45;
                                             AGG1 F46 { int x46;
                                              AGG2 F47 { int x47;
                                               AGG1 F48 { int x48;
                                                AGG2 F49 { int x49;
                                                 AGG1 F50 { int x50;
                                                  AGG2 F51 { int x51;
                                                   AGG1 F52 { int x52;
                                                    AGG2 F53 { int x53;
                                                     AGG1 F54 { int x54;
                                                      AGG2 F55 { int x55;
                                                       AGG1 F56 { int x56;
                                                        AGG2 F57 { int x57;
                                                         AGG1 F58 { int x58;
                                                          AGG2 F59 { int x59;
                                                           AGG1 F60 { int x60;
                                                            AGG2 F61 { int x61;
                                                             AGG1 F62 { int x62;
                                                              AGG2 F63 { int x63;
                                                               AGG1 F64 { int x64;       /* Message 0392 */
                                                                AGG2 F65 { int x65;
                                                                }f65;
                                                               }f64;
                                                              }f63;
                                                             }f62;
                                                            }f61;
                                                           }f60;
                                                          }f59;
                                                         }f58;
                                                        }f57;
                                                       }f56;
                                                      }f55;
                                                     }f54;
                                                    }f53;
                                                   }f52;
                                                  }f51;
                                                 }f50;
                                                }f49;
                                               }f48;
                                              }f47;
                                             }f46;
                                            }f45;
                                           }f44;
                                          }f43;
                                         }f42;
                                        }f41;
                                       }f40;
                                      }f39;
                                     }f38;
                                    }f37;
                                   }f36;
                                  }f35;
                                 }f34;
                                }f33;
                               }f32;
                              }f31;
                             }f30;
                            }f29;
                           }f28;
                          }f27;
                         }f26;
                        }f25;
                       }f24;
                      }f23;
                     }f22;
                    }f21;
                   }f20;
                  }f19;
                 }f18;
                }f17;
               }f16;
              }f15;
             }f14;
            }f13;
           }f12;
          }f11;
         }f10;
        }f09;
       }f08;
      }f07;
     }f06;
    }f05;
   }f04;
  }f03;
 }f02;
}f01;

See also:

QA·C Source Code Analyser 8.1.2
© 2013 Programming Research.
www.programmingresearch.com
Personality Groups | Glossary | Message Index Contents