关于CE的疑问
查看原帖
关于CE的疑问
544520
liugh_楼主2024/9/11 16:29

用C++14(GCC9)交会CE,而C++17就AC,然而编译信息只有警告没有错误,就抽象。在ubuntu用原生g++9.4也能过编译,mingw同样能。怀疑过我的缺省源(就是前13行),但粘到别的题上也能通过。求解答。

/tmp/compiler_yfigqwbq/src: 在函数‘void fw(T_)’中:
/tmp/compiler_yfigqwbq/src:13:398: 警告:数组下标类型为‘char’ [-Wchar-subscripts]
   13 | using namespace std;constexpr int s_=1<<20;char b_[s_],o_[s_],*p_=b_,*q_=b_,*r_=o_;template<class T_>inline bool fr(T_&x_){x_=0;char c_=0,f_=0;do{if(c_=='-')f_=1;if((c_=getchar())==-1)return 0;}while(c_<48||c_>57);do {x_=x_*10+c_-48;if((c_=getchar())==-1)break;}while(c_>47&&c_<58);if(f_)x_=-x_;return 1;}template<class T_>inline void fw(T_ x_){char d_[40],l_=-1;if(x_<0)x_=-x_,putchar('-');do d_[++l_]=x_%10+48;while(x_/=10);do putchar(d_[l_]);while(~--l_);}
      |                                                                                                                                                                                                                                                                                                                                                                                                              ^~~~
/tmp/compiler_yfigqwbq/src:13:441: 警告:数组下标类型为‘char’ [-Wchar-subscripts]
   13 | using namespace std;constexpr int s_=1<<20;char b_[s_],o_[s_],*p_=b_,*q_=b_,*r_=o_;template<class T_>inline bool fr(T_&x_){x_=0;char c_=0,f_=0;do{if(c_=='-')f_=1;if((c_=getchar())==-1)return 0;}while(c_<48||c_>57);do {x_=x_*10+c_-48;if((c_=getchar())==-1)break;}while(c_>47&&c_<58);if(f_)x_=-x_;return 1;}template<class T_>inline void fw(T_ x_){char d_[40],l_=-1;if(x_<0)x_=-x_,putchar('-');do d_[++l_]=x_%10+48;while(x_/=10);do putchar(d_[l_]);while(~--l_);}
      |                                                                                                                                                                                                                                                                                                                                                                                                                                                         ^~
/tmp/compiler_yfigqwbq/src:7:40: 附注:in definition of macro ‘putchar’
    7 | #define putchar(x_) ((r_-o_<s_)?(*r_++=x_):(flush(),r_=o_,*r_++=x_))
      |                                        ^~
/tmp/compiler_yfigqwbq/src:13:441: 警告:数组下标类型为‘char’ [-Wchar-subscripts]
   13 | using namespace std;constexpr int s_=1<<20;char b_[s_],o_[s_],*p_=b_,*q_=b_,*r_=o_;template<class T_>inline bool fr(T_&x_){x_=0;char c_=0,f_=0;do{if(c_=='-')f_=1;if((c_=getchar())==-1)return 0;}while(c_<48||c_>57);do {x_=x_*10+c_-48;if((c_=getchar())==-1)break;}while(c_>47&&c_<58);if(f_)x_=-x_;return 1;}template<class T_>inline void fw(T_ x_){char d_[40],l_=-1;if(x_<0)x_=-x_,putchar('-');do d_[++l_]=x_%10+48;while(x_/=10);do putchar(d_[l_]);while(~--l_);}
      |                                                                                                                                                                                                                                                                                                                                                                                                                                                         ^~
/tmp/compiler_yfigqwbq/src:7:65: 附注:in definition of macro ‘putchar’
    7 | #define putchar(x_) ((r_-o_<s_)?(*r_++=x_):(flush(),r_=o_,*r_++=x_))
      |                                                                 ^~
/tmp/compiler_yfigqwbq/src: In instantiation of ‘void fw(T_) [with T_ = int]’:
/tmp/compiler_yfigqwbq/src:138:56:   required from here
/tmp/compiler_yfigqwbq/src:7:52: 警告:right operand of comma operator has no effect [-Wunused-value]
    7 | #define putchar(x_) ((r_-o_<s_)?(*r_++=x_):(flush(),r_=o_,*r_++=x_))
      |                                                    ^
/tmp/compiler_yfigqwbq/src:13:379: 附注:in expansion of macro ‘putchar’
   13 | using namespace std;constexpr int s_=1<<20;char b_[s_],o_[s_],*p_=b_,*q_=b_,*r_=o_;template<class T_>inline bool fr(T_&x_){x_=0;char c_=0,f_=0;do{if(c_=='-')f_=1;if((c_=getchar())==-1)return 0;}while(c_<48||c_>57);do {x_=x_*10+c_-48;if((c_=getchar())==-1)break;}while(c_>47&&c_<58);if(f_)x_=-x_;return 1;}template<class T_>inline void fw(T_ x_){char d_[40],l_=-1;if(x_<0)x_=-x_,putchar('-');do d_[++l_]=x_%10+48;while(x_/=10);do putchar(d_[l_]);while(~--l_);}
      |                                                                                                                                                                                                                                                                                                                                                                                           ^~~~~~~
/tmp/compiler_yfigqwbq/src:13:403: 警告:数组下标类型为‘char’ [-Wchar-subscripts]
   13 | using namespace std;constexpr int s_=1<<20;char b_[s_],o_[s_],*p_=b_,*q_=b_,*r_=o_;template<class T_>inline bool fr(T_&x_){x_=0;char c_=0,f_=0;do{if(c_=='-')f_=1;if((c_=getchar())==-1)return 0;}while(c_<48||c_>57);do {x_=x_*10+c_-48;if((c_=getchar())==-1)break;}while(c_>47&&c_<58);if(f_)x_=-x_;return 1;}template<class T_>inline void fw(T_ x_){char d_[40],l_=-1;if(x_<0)x_=-x_,putchar('-');do d_[++l_]=x_%10+48;while(x_/=10);do putchar(d_[l_]);while(~--l_);}
/tmp/compiler_yfigqwbq/src:13:441: 警告:数组下标类型为‘char’ [-Wchar-subscripts]
   13 | using namespace std;constexpr int s_=1<<20;char b_[s_],o_[s_],*p_=b_,*q_=b_,*r_=o_;template<class T_>inline bool fr(T_&x_){x_=0;char c_=0,f_=0;do{if(c_=='-')f_=1;if((c_=getchar())==-1)return 0;}while(c_<48||c_>57);do {x_=x_*10+c_-48;if((c_=getchar())==-1)break;}while(c_>47&&c_<58);if(f_)x_=-x_;return 1;}template<class T_>inline void fw(T_ x_){char d_[40],l_=-1;if(x_<0)x_=-x_,putchar('-');do d_[++l_]=x_%10+48;while(x_/=10);do putchar(d_[l_]);while(~--l_);}
      |                                                                                                                                                                                                                                                                                                                                                                                                                                                         ^~
/tmp/compiler_yfigqwbq/src:7:40: 附注:in definition of macro ‘putchar’
    7 | #define putchar(x_) ((r_-o_<s_)?(*r_++=x_):(flush(),r_=o_,*r_++=x_))
      |                                        ^~
/tmp/compiler_yfigqwbq/src:7:52: 警告:right operand of comma operator has no effect [-Wunused-value]
    7 | #define putchar(x_) ((r_-o_<s_)?(*r_++=x_):(flush(),r_=o_,*r_++=x_))
      |                                                    ^
/tmp/compiler_yfigqwbq/src:13:430: 附注:in expansion of macro ‘putchar’
   13 | using namespace std;constexpr int s_=1<<20;char b_[s_],o_[s_],*p_=b_,*q_=b_,*r_=o_;template<class T_>inline bool fr(T_&x_){x_=0;char c_=0,f_=0;do{if(c_=='-')f_=1;if((c_=getchar())==-1)return 0;}while(c_<48||c_>57);do {x_=x_*10+c_-48;if((c_=getchar())==-1)break;}while(c_>47&&c_<58);if(f_)x_=-x_;return 1;}template<class T_>inline void fw(T_ x_){char d_[40],l_=-1;if(x_<0)x_=-x_,putchar('-');do d_[++l_]=x_%10+48;while(x_/=10);do putchar(d_[l_]);while(~--l_);}
      |                                                                                                                                                                                                                                                                                                                                                                                                                                              ^~~~~~~
/tmp/compiler_yfigqwbq/src:13:441: 警告:数组下标类型为‘char’ [-Wchar-subscripts]
   13 | using namespace std;constexpr int s_=1<<20;char b_[s_],o_[s_],*p_=b_,*q_=b_,*r_=o_;template<class T_>inline bool fr(T_&x_){x_=0;char c_=0,f_=0;do{if(c_=='-')f_=1;if((c_=getchar())==-1)return 0;}while(c_<48||c_>57);do {x_=x_*10+c_-48;if((c_=getchar())==-1)break;}while(c_>47&&c_<58);if(f_)x_=-x_;return 1;}template<class T_>inline void fw(T_ x_){char d_[40],l_=-1;if(x_<0)x_=-x_,putchar('-');do d_[++l_]=x_%10+48;while(x_/=10);do putchar(d_[l_]);while(~--l_);}
      |                                                                                                                                                                                                                                                                                                                                                                                                                                                         ^~
/tmp/compiler_yfigqwbq/src:7:65: 附注:in definition of macro ‘putchar’
    7 | #define putchar(x_) ((r_-o_<s_)?(*r_++=x_):(flush(),r_=o_,*r_++=x_))
      |                                                                 ^~
2024/9/11 16:29
加载中...