Why does GCC allow use of round() in C++ even with the ansi and pedantic flags?

前端 未结 3 506
温柔的废话
温柔的废话 2021-01-18 11:28

Is there a good reason why this program compiles under GCC even with the -ansi and -pedantic flags?

#include 

int mai         


        
3条回答
  •  攒了一身酷
    2021-01-18 12:20

    This is a bug. It's been around for a surprisingly long while. Apparently, there has not been enough of a collective desire to fix it. With a new version of C++ just around the corner which will adopt the C99 functions from math.h, it seems unlikely it will ever be fixed.

提交回复
热议问题