KHMan wrote:
Mike wrote:
See the attached crash.c. Compile with tcc crash.c
The last LGPL version of Rob's tree, now on:
http://hg.sharesource.org/mercurialtcc
I tested crash.c on Ubuntu 6.10, works. tcc reported ',' expected
at line 12, which I believe is correct behaviour.
As i
Hi,
Could a C guru out there please tell me why the following works? Extra points
if you can explain why it makes sense.
#include stdio.h
int main(){
int arr[10];
printf(%d\n,sizeof arr[0]); // ok
printf(%d\n,sizeof(arr[0])); // ok
printf(%d\n,sizeof(arr)[0]);
Hi,
The following patch makes tcc ignore the the #ident preprocessor
command.
Marc
--
Marc Andre Tanner http://www.brain-dump.org/ GPG key: CF7D56C0
diff -r 41841f0acc48 tcc.c
--- a/tcc.c Wed Oct 03 18:15:48 2007 -0500
+++ b/tcc.c Tue Nov 13 12:30:31 2007 +0100
@@ -2194,6 +2194,9 @@ static
Marc Andre Tanner wrote:
Could a C guru out there please tell me why the following works? Extra points
if you can explain why it makes sense.
#include stdio.h
int main(){
int arr[10];
printf(%d\n,sizeof arr[0]); // ok
printf(%d\n,sizeof(arr[0])); // ok
Could a C guru out there please tell me why the following works?
Extra points if you can explain why it makes sense.
#include stdio.h
int main(){
int arr[10];
printf(%d\n,sizeof arr[0]); // ok
printf(%d\n,sizeof(arr[0])); // ok
printf(%d\n,sizeof(arr)[0]); // ok, but why?
return 0;
On Nov 13, 2007, at 3:39 PM, grischka wrote:
Could a C guru out there please tell me why the following works?
Extra points if you can explain why it makes sense.
#include stdio.h
int main(){
int arr[10];
printf(%d\n,sizeof arr[0]); // ok
printf(%d\n,sizeof(arr[0])); // ok
2007/11/14, Marc Andre Tanner [EMAIL PROTECTED]:
The following patch makes tcc ignore the the #ident preprocessor
command.
FYI, GCC documentation on this strange directive.
http://gcc.gnu.org/onlinedocs/cpp/Other-Directives.html
--
Seo Sanghyeon
Joshua Phillips wrote:
oops, slight mistake, sorry. Here is replacement patch.
--
I was going to send this as a high-tech Mercurial bundle, but then I realized
I'd transplanted the parent, so it was a bit difficult. Here's a low-tech
patch file instead.
Check for duplicate
Sanghyeon Seo wrote:
2007/11/14, Marc Andre Tanner [EMAIL PROTECTED]:
The following patch makes tcc ignore the the #ident preprocessor
command.
FYI, GCC documentation on this strange directive.
http://gcc.gnu.org/onlinedocs/cpp/Other-Directives.html
Thanks, I'll add that to the changeset