473,385 Members | 1,740 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,385 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 1176

"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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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,...

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.