[LLVMdev] mismatched function signatures

Anton Korobeynikov anton at korobeynikov.info
Thu Jul 21 01:29:48 PDT 2011


> It seems fine if the mismatched types are the types that can work with
> trunc or ext. But other types, for example, structs, may not work. In
> general, if a parameter is of type t1, and its argument is of type t2,
> what value of the argument can we expect? Will it be a random value of
> type t2?
The call to function with mismatched signature yields undefined
behavior. So, everything can happen. E.g. you can expect that the
binary will format your hard drive and steal your cookies :)

-- 
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University



More information about the llvm-dev mailing list