![]() |
![]() |
1509 | ![]() |
||||
![]() | |||||||
| CMA undefined | |||||||
More than one definition has been found of this object or function. If an identifier with external linkage is used but there does not exist exactly one external definition in the program for the identifier, behavior is undefined. Notice that this is true whether the definitions are compatible or not. In a linkable program, only one definition of a function or object is allowed. Example:
void foo(int)
{
}
void foo(int) // ERROR: foo is defined twice
{
}
Where the second definition occurs in a different translation unit, the compiler will not be able to warn about the duplicate definition, so a Cross Module or linker check is required to detect such duplicates.
Example:
// TU1
void foo(int)
{
}
// TU2
void foo(int)
{
}
See also:
![]() | ||
| QA·C Source Code Analyser 8.1.2
© 2013 Programming Research. www.programmingresearch.com | Personality Groups | Glossary | Message Index | Contents |