473,387 Members | 1,582 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

how to interpret this c statement

hi, all,

Just confused with the following type definition. I will greatly appreciate
your comments on it and especially to explanations

struct prod_token_parm_item;
typedef struct GTY(()) prod_token_parm_item item;

so why there are so many brace following GTY and what's the meaning of this?

thanks,
Chao
Nov 14 '05 #1
1 1177

"chao liu" <ch*****@uiuc.edu> a écrit dans le message de
news:cf**********@news.ks.uiuc.edu...
hi, all,

Just confused with the following type definition. I will greatly appreciate your comments on it and especially to explanations

struct prod_token_parm_item;
typedef struct GTY(()) prod_token_parm_item item;

so why there are so many brace following GTY and what's the meaning of this?
thanks,
Chao


To understand this code you have to run it through the preprocessor.
Normally GTY should be a macro since it is all in uppercase, Traditionally
macros are written all in uppercase.

The first step of a compilation is to run the preprocessor, translating
macros.

Most compilers will answer to

cc -E

or similar, and will write the preprocessor output either into a file
or into the screen.

Then look at the line where you find both the word
"typedef"
and
"prod_token_parm_item"

and verify if this is the correct line.

Then, look at the output, and see what C statement was being
generated.

This is the only way to understand this, or try to find the macro definition
of GTY.

grep GTY *.h

comes to mind.

Nov 14 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Justin Carter | last post by:
Hi. I'm using VB6 and trying to read in a simple text file. I'm using a statement similar to the following, which generally works fine. Input #Item, variable1, variable2, variable3, etc. ...
9
by: franzkowiak | last post by:
Hello, I've read some bytes from a file and just now I can't interpret 4 bytes in this dates like a real value. An extract from my program def l32(c): return ord(c) + (ord(c)<<8) +...
17
by: Suzanne Vogel | last post by:
I'd like to convert a double to a binary representation. I can use the "&" bit operation with a bit mask to convert *non* float types to binary representations, but I can't use "&" on doubles. ...
2
by: toto4UK | last post by:
Hello, One of my queries running with Oracle 8.1.7.4 on a SPARC machine with SunOS 5.8 has been traced and TKPROF gave me the following result for PEF stats : Need to say that query is a...
21
by: junky_fellow | last post by:
I found the following declaration in some header file. Can somebody help me how to interpret this ? void (*signal( int sig, void (*function)(int)) (int) ); Thanx for any help in advance ....
2
by: Henry | last post by:
I am trying to work my way through a textbook on web services. I was running a help page and got this error message. To me it is vague. Not knowing the code well enough I am not sure which data...
2
by: hup | last post by:
One of my Linux (CentOS) server stop interpret php code any more. I did try to compile and installed other version of php, but it's still not working. # cat /tmp/phpinfo.php <? phpinfo() ?>...
2
by: tushar.kale24 | last post by:
Hi all, Why re-interpret cast should not be used in practise? Regards
1
by: Twayne | last post by:
Hi, Complete newbie here, no C or related language background; starting from the basics. I DO have Visual Basic 6 (non .NET) and batch file experience, but that's all. I have the following...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.