Renesas TM V.3.20A Spezifikationen Seite 61

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 64
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 60
Renesas Technology, Tools FAQs
Last Updated: June 21, 2004
Document Number: 04051002_e
Q.
When I describe enumerators for the left and right operands of the conditional operator ":" the return value is input as an enumerated
variable, I get a report message regardless of using the same type.
Why does SQMlint output this message?
C source example:
--------------------------
enum E { A, B, C };
void func(int i)
{
enum E e;
e = (i == 0) ? A : B;
}
--------------------------
Message output:
Rule 43 (Complaining) "information loss conversion (from 'signed int' to 'enum E')
in assignment operation"
Rule 29 (Complaining) "enum type object to which has not been assigned own
enumerator"
A.
When describing enumerators on the left and right side of the conditional operator ":", the conditional operator returns an int type
value. Therefore, SQMlint judges the returned int type as different from the enumeration type, and therefore outputs a report
message.
In this case, please ignore the report message.
Top of Page | Back to Previous Page
Terms of Use Privacy Policy
(C)2004 Renesas Technology Corp., All Rights Reserved.
Seitenansicht 60
1 2 ... 56 57 58 59 60 61 62 63 64

Kommentare zu diesen Handbüchern

Keine Kommentare