[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference turris::c_plus_plus

Title:C++
Notice:Read 1.* and use keywords (e.g. SHOW KEY/FULL KIT_CXX_VAX_VMS)
Moderator:DECCXX::AMARTIN
Created:Fri Nov 06 1987
Last Modified:Thu Jun 05 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:3604
Total number of notes:18242

3526.0. "stl_marcos header ?" by CSC32::I_WALDO () Thu Apr 03 1997 20:37

    A customer thinks he has found a header file problem.
    
    OpenVMS Alpha 7.0
    DEC C++ V5.5-017
    
    stl_macros.
    
    #if defined (__DECCXX) && (defined(__CFRONT) || defined(__MS))
    
    A previous version had 
    
    #if defined (__DECCXX) && (__CFRONT || __MS)
    
    I checked my recently installed C++ 5.5-017 on OpenVMS Alpha 7.1 and
    saw
    
    #if defined (__DECCXX) && (__CFRONT || __MS)
    
    
    So, which is correct?  
T.RTitleUserPersonal
Name
DateLines
3526.1Looks like progress...DECC::SULLIVANJeff SullivanThu Apr 03 1997 21:1026
I'm not sure what the percieved problem is, but it looks like the newer version
of the header file has a more portable conditional.

I tested this on UNIX using DEC C++ V5.5-004

% cat t.cxx
#if defined (__DECCXX) && (defined(__CFRONT) || defined(__MS))
Passes test 1
#endif

#if defined (__DECCXX) && (__CFRONT || __MS)
Passes test 2
#endif

% cxx -E t.cxx | grep Pass
% cxx -E t.cxx -cfront | grep Pass
Passes test 1
Passes test 2
% cxx -E t.cxx -ms | grep Pass    
Passes test 1
Passes test 2


Is the user concerned that the new conditional is not doing th right thing?

-Jeff
3526.2DECCXL::OUELLETTEcrunchThu Apr 03 1997 22:224
I think the user may be conserned that "#define __MS 0" is used somewhere.
For that there is a difference between the two #if's.

R.
3526.3verify pleaseHNDYMN::MCCARTHYA Quinn Martin ProductionFri Apr 04 1997 13:1711
Could you please confirm the line:

>>    #if defined (__DECCXX) && (defined(__CFRONT) || defined(__MS))

in the customers's version?  Also double check the the OS version for me.

The reason I ask is that when I checked all the version of that header file
that we have ever created in our CMS library, the above line never 
appears.

Brian J.
3526.4customer modificationCSC32::I_WALDOFri Apr 04 1997 16:507
    re .3
    
    >> #if defined (__DECCXX) && (defined(__CFRONT) || defined(__MS))
    
    When I questioned the customer again I discovered that the above was
    a modification which he put in stl_macros to make it behave that way he
    considered to be correct. 
3526.5what's wrong with it? HNDYMN::MCCARTHYA Quinn Martin ProductionFri Apr 04 1997 17:087
I have to ask then, what behavior where they seeing that they considered
incorrect?

Were they defining __MS to some value?  Does a compile with /list/show=all
show __MS defined (listing files show what macros are in effect)?

Brian
3526.6customer response to .5CSC32::I_WALDOMon Apr 07 1997 20:4434
>What problem were you resolving when you changed the line from 
>
>#if defined (__DECCXX) && (__CFRONT || __MS)   to
>
>#if defined (__DECCXX) && (defined(__CFRONT) || defined(__MS))
>

$ create t.c
#if defined (__DECCXX) && (__CFRONT || __MS)
static int i;
#endif

$ cxx t.c/warn=enable=all

#if defined (__DECCXX) && (__CFRONT || __MS)
...........................^
%CXX-I-UNKNOWNMACRO, "__CFRONT" is not currently defined as a macro.  It has 
been replaced by the constant zero.
at line number 1 in file DKA0:[TUCKER.PSTORE]T.C;4

#if defined (__DECCXX) && (__CFRONT || __MS)
.......................................^
%CXX-I-UNKNOWNMACRO, "__MS" is not currently defined as a macro.  It has been 
replaced by the constant zero.
at line number 1 in file DKA0:[TUCKER.PSTORE]T.C;4

Sorry about this.  You have to use /WARN=ENABLE=ALL.



Thanks,
Roger Tucker	(tucker@spike.cs.mci.com, or roger.tucker@mci.com)

3526.7Looks reasonableHNDYMN::MCCARTHYA Quinn Martin ProductionMon Apr 07 1997 22:063
Thanks for the details.

bjm
3526.8FNHNDYMN::MCCARTHYA Quinn Martin ProductionTue Apr 08 1997 15:265
We have made the change in our sources and it will be part of the V5.6 release.

Thanks for pointing it out.

Brian J.