Resources | Resources |



Error messages

Any output printed by the compiler is due to either an error or a warning. Warnings include the text "warning:" at the beginning of the message, and do not abort code generation. Any message not preceded by "warning:" is an error, which causes compilation to abort. Both errors and warnings include a reference to the file, line, and position within that line (starting at 0) where the error or warning occurred. Additional details on select errors are given in the following subsections.

Identifier abc clashes with an introduced typeabc

The OMG IDL specification InformationTechnology Open Distributed Processing Interface Definition Language ITU-TX.920 includes complex scoping rules based not only on where types are defined, but also on where they are used. Specifically, the first component (identifier) of a qualified type name is introduced into the scope where it is used, preventing the use of any identifier with the same name in that scope. Fully-qualified names, which start with ::, are considered to have an empty first component, and thus result in no type introduction.

The following example illustrates the basic type introduction rules. For full details, see the Names and Scoping section of the Information Technology Open Distributed Processing Interface Definition Language ITU-TX.920.

struct Name
    string first, last;

struct Address
   string street, city, state, country;

module M
   typedef long Age;

struct Person
   Name   name;    // invalid IDL: 'name' clashes with 'Name'
   string address; // OK: 'Address' not introduced in this scope
   M::Age age;     // OK: only 'M', not 'Age', is introduced

In the Person structure above, use of the Name type introduces it into the scope of Person, which prevents the member from being called name. The second member, address, is fine because the Address type is not defined within the scope of Person and has not been introduced. The reference to M::Age only causes the first component, M, to be introduced into the scope of Person, thus the age member is also without error.

Clashes with introduced types can generally be resolved by changing the qualification to avoid the type introduction. For instance, if in the above example the type of the name member of the Person structure is written ::Name, no type introduction would occur, which would avoid the name clash.