HP aC++/HP C Programmer's Guide (B3901-90036; A.06.26; September 2011)

#endif FLAG
}
To compile with HP aC++, change the code to:
int main(){
#ifdef FLAG
int i;
i=1;
#endif //FLAG
}
overload not a Keyword
In HP C++, using the overload keyword to specify a function as an overloaded function
causes an anachronistic warning and is ignored. In HP aC++, using the overload
keyword causes an error and the program does not compile. To change this, remove all
occurrences of the overload keyword.
Example:
Compiling the following code with HP C++ causes a warning. Compiling with HP aC++
generates an error stating that overload is used as a type, but has not been defined as
a type.
int f(int i);
overload int f(float f); // Remove the word overload.
int main () {
return 1;
}
Dangling Comma in enum
In HP C++, a comma following the last element in an enum list is ignored. In HP aC++,
a comma following the last element in an enum list generates an error. To avoid this
error, remove the comma after the last element.
Example:
HP C++ accepts the following code. HP aC++ generates an error stating that the comma
(,) is unexpected.
enum Colors { red,
orange,
yellow,
green,
blue,
indigo,
violet, // This comma is illegal.
};
Static Member Definition Required
In HP C++, you can declare a static member and not define it. However, in HP aC++,
you cannot do so. You must define the declared static data member.
Migration Considerations Related to Standardization 267