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

Conference turris::decc_bugs

Title:DEC C Problem Reporting Forum
Notice:Report DEC C++ problems in TURRIS::C_PLUS_PLUS
Moderator:CXXC::REPETETCHEON
Created:Fri Nov 13 1992
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:1299
Total number of notes:6249

1292.0. "FUTUREKEYWORD is more severe in relaxed than in severe mode" by MOVIES::COMPTON (Celibacy...without it, children) Thu May 08 1997 09:56

    
    
    I have noticed the following anonomaly, whilst using DECC V5.6-003. If
    I compile a module which has restrict as an identifier, I get an
    Informantional message when compiling /STAND=ANSI, and an Warning
    message when compiling /STAND=RELAXED. If anything, I would have
    thought that it would have been the other way round, but an
    Informational would seem sufficient for both cases, actually.
    
    Thanks,
    		- Ian Compton
    
CC /include=($inc)/nest=none /DECC/STAND=ANSI 
    /WARN=(DIS=(DOLLARID,PRAGMA,BITNOTINT,FUNCREDECL)) 
    /UNDEF="__HIDE_FORBIDDEN_NAMES" /LIS=$LIS:.LIS/OBJ=$OBJ:LFS_CLEANER.OBJ
    /MMS=(FILE=$BLD:.DEP,SYSTEM) /DEBUG/OPT/REENT=MULTI/MACH/EXTERN=STRICT
    /INST=NOFLOAT/NOSTACK/PREFIX=ALL 
    /def=("GRYPHON","KERNEL","PRODUCT",TAG=MDIVI_LFS,DBG_VF) $SRC:LFS_CLEANER.C

                                   bool_t            restrict);
.....................................................^
%CC-I-FUTUREKEYWORD, "restrict" is a keyword in the next revision of the ANSI 
    C Standard.  Using it as an identifier will prevent your program from 
    conforming to that standard.
at line number 1459 in file DLR_T1IR$:[DLR_LFS.SRC]LFS_SA_FUNCS.H;1


CC  /include=($inc)/nest=none /DECC/STAND=RELAX /LIS=$LIS:.ULIS
    /OBJ=$OBJ:LFS_CLEANER.UOBJ/MMS=(FILE=$BLD:.UDEP,SYSTEM) /NODEBUG/OPT
    /REENT=MULTI/MACH/EXTERN=STRICT/PREFIX=ALL /def=("GRYPHON","PRODUCT") 
    $SRC:LFS_CLEANER.C

                                   bool_t            restrict);
.....................................................^
%CC-W-FUTUREKEYWORD, "restrict" is a keyword in the next revision of the ANSI 
    C Standard.  Using it as an identifier will prevent your program from 
    conforming to that standard.
at line number 1459 in file DLR_T1IR$:[DLR_LFS.SRC]LFS_SA_FUNCS.H;1

    
T.RTitleUserPersonal
Name
DateLines
1292.1Here's whyDECC::VOGELThu May 08 1997 10:5532
    Ian,

    A good question.  Here's what our thinking was:

    When the next version of the standard gets approved, we will most
    probably be adding a new standard mode: (perhaps) /STAND=ANSI_9x.  There
    is a chance that we will also add /STAND=ANSI_89 to signify
    compatibility with the ANSI 89 C standard.  At this point we're
    guessing that /STAND=STRICT_ANSI will be the same as /STAND=ANSI_89
    as that is what it means today.  So...a program that uses a variable 
    restrict will most likely continue to work in the future with 
    /STAND=STRICT_ANSI.  That's why the the message is an informational in 
    /STAND=STRICT_ANSI mode.

    Now...the question is, what do we do with /STAND=RELAXED_ANSI
    when the new standard is approved?  We really don't want to introduce 
    /STAND=RELAXED_ANSI_89 and /STAND=RELAXED_ANSI_9x.  We believe
    the right thing to do is to have /STAND=RELAXED_ANSI (which is
    our default) pick up all the features of the new standard.  Therefore
    in the default mode, restrict will become a keyword and the program
    in question will no longer compile.  That's why this is a warning
    in /STAND=RELAXED_ANSI. 

    So...at this point we think we'll have /STAND=STRICT_ANSI accept variables
    named restrict in the future, but /STAND=RELAXED_ANSI will not
    accept these variables in the future.  

					Does this make sense?

					Ed

1292.2Sort of.MOVIES::COMPTONCelibacy...without it, childrenThu May 08 1997 12:3712
    Yes, it kind of makes sense, except that the qualifiers that exist at
    the moment are:
    
    /STANDARD=ANSI89   and
    /STANDARD=RELAXED_ANSI89
    
    There is no /STANDARD=STRICT_ANSI. So if you are not wanting to have 4
    different qualifiers, you are going to have to change the name to
    /STANDARD=RELAXED_ANSI9x at some point.
    
    - Ian
    
1292.3oopsDECC::VOGELThu May 08 1997 13:3720
    
    Gee...do I feel silly....that's what I get for using the terms
    we use internally which are different than what we specify in DCL.
    
    So what I should have said is that we will probably add
    /STAND=ANSI9x mode, and will either change the meaning of
    /STANDARD=RELAXED_ANSI89 or maybe even change the qualifier
    to be /STANDARD=RELAXED_ANSI.  Changing the qualifier may not
    be a big deal.  As it's the default there are proabably few users
    of it.  
    
    My point remains.  It is our current plans to "break" programs that use
    restrict in the default compiler mode on VMS, but to continue to
    compile those programs if /STAND=ANSI89 is used.
    
    Thanks for pointing this out...
    
    						Ed