[
https://issues.apache.org/jira/browse/AXIS2C-779?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12545438
]
Dimuthu Gamage commented on AXIS2C-779:
---------------------------------------
I added following words as reserve words. Please correct me if I have to check
some other references as well.
// c/ c++ keywords
"asm", "auto", "bool", "break", "break", "case", "catch",
"char", "class", "const", "const_cast",
"continue", "default", "delete", "do", "double",
"dynamic_cast", "else", "enum", "explicit",
"export", "extern", "false", "float", "for", "friend",
"goto", "if", "inline", "int", "long",
"mutable", "namespace", "new", "operator", "private",
"protected", "public", "register",
"reinterpret_cast", "return", "short", "signed", "sizeof",
"static", "static_cast", "struct",
"switch", "template", "this", "throw", "true", "try",
"typedef", "typeid", "typename", "union",
"unsigned", "using", "virtual", "void", "volatile",
"wchar_t", "while",
//microsoft c++ keywords reference:
http://msdn2.microsoft.com/en-US/library/2e6a4at9(VS.80).aspx
"__abstract", "abstract", "__alignof Operator", "array",
"__asm", "__assume", "__based", "bool",
"__box", "break", "case", "catch", "__cdecl", "char",
"class", "const", "const_cast", "continue",
"__declspec", "default", "__delegate", "delegate",
"delete", "deprecated", "dllexport", "dllimport",
"do", "double", "dynamic_cast", "else", "enum", "enum
class", "enum struct", "event", "__event",
"__except", "explicit", "extern", "false", "__fastcall",
"__finally", "finally", "float", "for",
"for each", "in", "__forceinline", "friend", "friend_as",
"__gc", "gcnew", "generic", "goto",
"__hook", "__identifier", "if", "__if_exists",
"__if_not_exists", "initonly", "__inline", "inline",
"int", "__int8", "__int16", "__int32", "__int64",
"__interface", "interface class",
"interface struct", "interior_ptr", "__leave", "literal",
"long", "__m64", "__m128", "__m128d",
"__m128i", "__multiple_inheritance", "mutable", "naked",
"namespace", "new", "new", "__nogc",
"noinline", "__noop", "noreturn", "nothrow", "novtable",
"nullptr", "operator", "__pin", "private",
"__property", "property", "property", "protected",
"public", "__raise", "ref struct", "ref class",
"register", "reinterpret_cast", "return", "safecast",
"__sealed", "sealed", "selectany", "short",
"signed", "__single_inheritance", "sizeof", "static",
"static_cast", "__stdcall", "struct",
"__super", "switch", "template", "this", "thread", "throw",
"true", "try", "__try/__except",
"__try/__finally", "__try_cast", "typedef", "typeid",
"typeid", "typename", "__unaligned",
"__unhook", "union", "unsigned", "using declaration",
"using directive", "uuid", "__uuidof",
"value struct", "value class", "__value", "virtual",
"__virtual_inheritance", "void", "volatile",
"__w64", "__wchar_t", "wchar_t", "while",
> WSDL2C generates invalid function prototypes when WSDL operation name is a
> C/C++ reserved word
> ----------------------------------------------------------------------------------------------
>
> Key: AXIS2C-779
> URL: https://issues.apache.org/jira/browse/AXIS2C-779
> Project: Axis2-C
> Issue Type: Improvement
> Components: code generation
> Affects Versions: Current (Nightly)
> Environment: Windows XP, Visual Studio 2005
> Reporter: Bill Mitchell
> Priority: Minor
> Attachments: service.wsdl
>
>
> When given a WSDL with a operation with the name "delete", WSDL2C generates a
> function prototype for the operation using "delete" as the name of a formal
> parameter. Of course, the C++ compiler processing the header considers this
> an invalid use of a reserved word.
> In particular, let the WSDL contain an operation definition of the form:
> ...
> <operation name="delete">
> <input message="fw:deleteRequest"/>
> <output message="fw:deleteResponse"/>
> </operation>
> ...
> The generated prototype looks like this:
> The template in the header for the stub for this operation is:
> axiom_node_t* axis2_stub_Fservice_delete( axis2_stub_t *stub, const
> axutil_env_t *env,
> axiom_node_t* delete);
> I have verified that the same problem arises with words from the C reserved
> word list. If the operation name is "struct", then the formal parameter name
> is also "struct", in both the generated .h and .c files.
> At least 3 approaches to resolving the problem are possible:
> (1) Always prefix the names used in the formal parameters with a fixed Axis2
> string, e.g., "op_".
> (2) Replace names with a substitute when they are found to conflict with a
> word in the C/C++ reserved word list.
> (3) Prefix all names from the WSDL with a string representing the namespace,
> so that every name is of the form nsstring_name, where even the default
> namespace is replaced with some nsstring.
> Where solution (3) might solve a general class of conflcts of names across
> namespaces as well as this specific issue, for this one issue of the formal
> parameter to the operation stub solution (1) should be adequate.
> The workaround, where the user is not able to change the WSDL itself, is to
> hand massage the generated .h and .c files after code generation wherever the
> conflict arises and the compiler diagnoses the error.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]