The compiler always checks for optimizing consistency. If you specify an optimization option that contradicts certain security rules, the compiler will issue warning messages. The security rules are:
The compiler directly links AutoLISP function calls only if the following conditions are met:
The compiler tries to drop a function symbol only if all corresponding function calls are directly linked to the function definition. The compiler does not drop the symbol for a function definition if the program calls the function by its symbol name. A function is called by symbol in the following cases:
Note that for functions called from top-level expressions, the Drop declaration will be ignored without warning messages.
defun, lambda, and foreach expressions if any of the following conditions are true:The compiler does not localize a variable in bound lists of
for more information on this topic.Other than these conditions, which always cancel the optimization and result in warning messages, there are other conditions that may or may not result in incorrect code. Choose the Safe Optimize option for the project to disallow these conditions as well. Disabling Safe Optimization results in compiler warnings if these conditions are met. See