Re: [Ur] sanity checking

2010-12-13 Thread Adam Chlipala

Karn Kallio wrote:
Well, looking at the code I thought that it should output both, 
because gcc

is supposed to support non-constant initializers.  But I am not really any
help, because I do not know enough about gcc to say.  One thing that I do
notice in your example is that the printf should be leaving an integer in the
__uwf_1 position of tmp but how could there be space for it (as uw_unit should
occupy 0 size) ...
   


I think this is a confusion between the comma separator between 
initializer elements and the comma operator in expressions.  I think my 
use of parentheses triggers interpretation as the latter, not the former.


I'm going to try to figure out the GCC bug report procedure and submit 
this test case.


___
Ur mailing list
Ur@impredicative.com
http://www.impredicative.com/cgi-bin/mailman/listinfo/ur


Re: [Ur] sanity checking

2010-12-13 Thread Karn Kallio
 Karn Kallio wrote:
  Well, looking at the code I thought that it should output both,
  because gcc
  is supposed to support non-constant initializers.  But I am not really
  any help, because I do not know enough about gcc to say.  One thing that
  I do notice in your example is that the printf should be leaving an
  integer in the __uwf_1 position of tmp but how could there be space for
  it (as uw_unit should occupy 0 size) ...
 
 I think this is a confusion between the comma separator between
 initializer elements and the comma operator in expressions.  I think my
 use of parentheses triggers interpretation as the latter, not the former.
 

You are right of course ... I did think it was two initializer elements, but 
now I see that your example initializes the first leaving the second to 
default ... 


___
Ur mailing list
Ur@impredicative.com
http://www.impredicative.com/cgi-bin/mailman/listinfo/ur


[Ur] sanity checking

2010-12-12 Thread Karn Kallio
Same here with gcc (GCC) 4.4.3

[kkal...@eka:~/scratch/test]$ gcc test.c 

[kkal...@eka:~/scratch/test]$ ./a.out 
Outer

___
Ur mailing list
Ur@impredicative.com
http://www.impredicative.com/cgi-bin/mailman/listinfo/ur


Re: [Ur] sanity checking

2010-12-12 Thread Adam Chlipala

Karn Kallio wrote:

Same here with gcc (GCC) 4.4.3

[kkal...@eka:~/scratch/test]$ gcc test.c

[kkal...@eka:~/scratch/test]$ ./a.out
Outer
   


Thanks.  The other important question is whether, when you look at the 
code, you also expect it to output two lines, not just one.


___
Ur mailing list
Ur@impredicative.com
http://www.impredicative.com/cgi-bin/mailman/listinfo/ur


Re: [Ur] sanity checking

2010-12-12 Thread Karn Kallio
 Karn Kallio wrote:
  Same here with gcc (GCC) 4.4.3
  
  [kkal...@eka:~/scratch/test]$ gcc test.c
  
  [kkal...@eka:~/scratch/test]$ ./a.out
  Outer
 
 Thanks.  The other important question is whether, when you look at the
 code, you also expect it to output two lines, not just one.

Well, looking at the code I thought that it should output both,  because gcc 
is supposed to support non-constant initializers.  But I am not really any 
help, because I do not know enough about gcc to say.  One thing that I do 
notice in your example is that the printf should be leaving an integer in the 
__uwf_1 position of tmp but how could there be space for it (as uw_unit should 
occupy 0 size) ... 

___
Ur mailing list
Ur@impredicative.com
http://www.impredicative.com/cgi-bin/mailman/listinfo/ur