Changeset 4d5e57b for src/ResolvExpr


Ignore:
Timestamp:
Nov 20, 2017, 4:03:55 PM (7 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
1ba5803
Parents:
cdbfab0
Message:

Prevent implicit conversion of void * to other pointer type for parameter passing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/PtrsAssignable.cc

    rcdbfab0 r4d5e57b  
    6868
    6969        void PtrsAssignable::visit( __attribute((unused)) VoidType *voidType ) {
    70                 if ( ! dynamic_cast< FunctionType* >( dest ) ) {
    71                         // T * = void * is safe for any T that is not a function type.
    72                         // xxx - this should be unsafe...
    73                         result = 1;
    74                 } // if
     70                // T * = void * is disallowed - this is a change from C, where any
     71                // void * can be assigned or passed to a non-void pointer without a cast.
    7572        }
    7673
Note: See TracChangeset for help on using the changeset viewer.