Bug 557

Summary: IDL compiler does not handle pragma scope correctly
Product: TAO Reporter: rich
Component: IDL CompilerAssignee: Jeff Parsons <parsons>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: P3    
Version: 1.1   
Hardware: All   
OS: All   

Description rich 2000-05-04 17:42:51 CDT
If you have a pragma prefix in an idl file and subsequently include a file that
specifies another prefix, all repository ids in the first file get the prefix of
the included file. (According to Advanced CORBA Programming using C++ this
should not happen.

e.g.
File1.idl

#pragma prefix "PrefixA"

interface A {};

**********************

File2.idl

#pragma prefix "PrefixB"
#include "File1.idl"

inteface B {};

**************************

The prefix for interface B is "PrefixA" instead of "PrefixB"

A simple workaround is to place the pragma after the included file(s)

Note: this was discovered when trying to narrow an object reference using the
JAC ORB which adheres to the pragma scoping.  Within ACE/TAO all of the Id's are
generated consistently so chances are you won't see this failure.
Comment 1 rich 2000-05-04 17:54:59 CDT
Duplicate

*** This bug has been marked as a duplicate of 129 ***