-
Notifications
You must be signed in to change notification settings - Fork 380
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ACE6] tao_idl Improvements #1366
[ACE6] tao_idl Improvements #1366
Conversation
Use conventional HTML, non breaking dashs, remove some outdated information.
Make it easier to read and edit by replacing tabs with spaces.
This is a backport of the same commit in DOCGroup#1357, but with copy preprocessor input method being the default. Fixes an issue that came up in OpenDDS/OpenDDS#2161. To make behavior of `#include ".."` consistent with C and C++, change how `tao_idl` calls the C preprocessor by default in most cases from making a copy of the IDL file to using the IDL file directly.
@@ -0,0 +1,7 @@ | |||
project(*): taoidldefaults { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
project(*): taoidldefaults { | |
project: taoidldefaults { |
`#include ".."` consistent with C and C++. This is not enabled by default | ||
like it is in TAO 3, though. For details, see the `--preprocessor-input` | ||
argument in `docs/compiler.html`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if the TAO 3 note is needed here. The scope of this section is TAO 2.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe, but it is a behavior difference between the two, so I feel like it has to be mentioned somewhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it require time travel to have TAO 2 know what TAO 3 does?
} | ||
else | ||
{ | ||
i++; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i++; | |
++i; |
{ | ||
ACE_ERROR ((LM_ERROR, ACE_TEXT ("Use \"guess\", \"direct-with-e\", ") | ||
ACE_TEXT ("\"direct-without-e\", \"direct-gcc\", or \"copy\".\n"), | ||
av[i])); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there supposed to be a %C
or similar in the format string?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it's a old typo I copied from the code for --unknown-annotations
. I will fix both.
if (!input) return 0; | ||
const size_t size = ACE_OS::strlen (input); | ||
char *output = 0; | ||
ACE_NEW_RETURN (output, char [size], 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACE_NEW_RETURN (output, char [size], 0); | |
ACE_NEW_RETURN (output, char[size], 0); |
// Decide how files will be passed to the preprocessor | ||
if (idl_global->preprocessor_input_ == IDL_GlobalData::PreprocessorInputGuess) | ||
{ | ||
const char * const cpp_name = tolower (our_basename (FE_get_cpp_loc_from_env ())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const char * const cpp_name = tolower (our_basename (FE_get_cpp_loc_from_env ())); | |
const char *const cpp_name = tolower (our_basename (FE_get_cpp_loc_from_env ())); |
if (idl_global->preprocessor_input_ == IDL_GlobalData::PreprocessorInputGuess) | ||
{ | ||
const char * const cpp_name = tolower (our_basename (FE_get_cpp_loc_from_env ())); | ||
const char * method = "copy"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const char * method = "copy"; | |
const char *method = "copy"; |
throw Bailout (); | ||
} | ||
|
||
if (WIFEXITED ((status))) | ||
{ | ||
// Child terminated normally? | ||
if (WEXITSTATUS ((status)) != 0) | ||
const ACE_exitcode narrowed_status = WEXITSTATUS ((status)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const ACE_exitcode narrowed_status = WEXITSTATUS ((status)); | |
ACE_exitcode const narrowed_status = WEXITSTATUS ((status)); |
See my comments of #1357, why not set the preprocessor handling through config*.h files instead of guessing it in tao_idl. |
Backport of the appropriate features of #1357 to TAO 2.
__TAO_IDL_IDL_VERSION
.__TAO_IDL
IDL preprocessor macro.idl2jni
, which is atao_idl
-derived compiler, can't properly handle relative includes becausetao_idl
makes a temporary copy that is passed to the preprocessor. Unlike in tao_idl Improvements #1357guess
is not the default for--preprocessor-input
, butcopy
is, which is the current behavior.