This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/19826] [4.0 Regression] More array bounds rejected as non-constant in template...


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-02-08 19:50 -------
Is the problem here (in sematics.c):
	  /* Since this name was dependent, the expression isn't
	     constant -- yet.  No error is issued because it might be
	     constant when things are instantiated.  */
	  if (integral_constant_expression_p)
	    *non_integral_constant_expression_p = true;

Can someone help me if this really should be false because that fixes both this bug and PR 18470.
With that change we still reject the following testcase:
template<typename T> struct A
{
    static const T i = 1;
    char a[i];
};
A<float> a;


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19826


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]