ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
They are the same. The only difference is that the name song is used for the first union and the second union is unnamed. That difference is insignificant because both forms are typdefing the unions to a given type name.
size_t is platform specific, however, most platforms typedef this field as long unsigned integer. On my system, it is defined as:
# 214 "/usr/lib/gcc/x86_64-redhat-linux/4.0.1/include/stddef.h" 3 4
typedef long unsigned int size_t;
That shows what line from which file the given source code was seen.
In this particular case, the definition was in a file called:
/usr/lib/gcc/x86_64-redhat-linux/4.0.1/include/stddef.h
This file is part of the gcc compiler header files in the standard includes. This compiler is called gcc (GNU C Compiler) targeted for code generation on an Athlon64 (x86_64) system and is version 4.0.1.
That line starting with the # mark is the result of only pre-processing the C source file including <stdio.h>. I only extracted the two pertinent lines for you (the full contents is large).
Pre-processing occurs prior to compilation where all those preprocessor directives (lines that start with the # symbol like #include, #if... #endif, #define, etc. ) are interpreted and the source file is converted to a readable source file that the compiler can parse. This phase is done automatically when you compile, but you can usually specify only preprocess to the compiler for debugging purposes or if you write tools to analyze the processed C code.
A little long winded, but I have a feeling you wanted more detail anyway.
That is from the GNU preprocessor. They are flags from the preprocessor to the compiler. These are not a standard C compiler flags.
Briefly, it 3 means the following text comes from a system header file, so certain warnings should be suppressed. The 4 means the following text should be treated as being wrapped in an implicit extern "C" block. To be explict, the following lines are the text lines following the # directive upto the next # directive indicating another file.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.