X == 3
чтобы определить возможность деления на ноль? X
для выражения (X - 5) / (X * X - 9)
произойдет деление на ноль? va_list
отдано на откуп разработчикам трансляторов. Однако, важно помнить правила перегрузки функций и соглашение о вызовах - у перегрузки с ...
наименьший приоритет и такая перегрузка не является обобщенной или шаблонной....
обозначает просто еще один параметр, общение с которым возможно только через фасад va_list
.printf
- это и есть UB.If any argument after default argument promotions is not the type expected by the corresponding conversion specifier, or if there are fewer arguments than required by format, the behavior is undefined.
printf
, будет здорово. *((float *)&i)
- что есть UB. [?]The purpose of strict aliasing and related rules is to enable type-based alias analysis, which would be decimated if a program can validly create a situation where two pointers to unrelated types (e.g., an int* and a float*) could simultaneously exist and both can be used to load or store the same memory (see this email on SG12 reflector). Thus, any technique that is seemingly capable of creating such a situation necessarily invokes undefined behavior.
То есть, в вашем случае выполняется не (float)i, а *((float *)&i).
printf
? Давай вот вместе припомним, какое поведение у va_list
?
Сумму каких чисел?