473,465 Members | 1,964 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Underscore

i was looking at the code of GNU m4 (/src/eval.c to be specific) and
saw this in function prototypes

static eval_error logical_or_term _((eval_token, eval_t *));
__________________________________^

what is this underscore for?

Nov 14 '05 #1
2 1621
On 5 Jan 2005 05:29:09 -0800,
foaud167 <f.*******@gmail.com> wrote:

i was looking at the code of GNU m4 (/src/eval.c to be specific) and
saw this in function prototypes

static eval_error logical_or_term _((eval_token, eval_t *));
__________________________________^

what is this underscore for?


It is a macro, defined in one of the #include files. Probably
the purpose is to create a pre-ANSI or proper ANSI prototype depending on
the compiler being used.
Villy
Nov 14 '05 #2
On 5 Jan 2005 05:29:09 -0800, foaud167
<f.*******@gmail.com> wrote:
i was looking at the code of GNU m4 (/src/eval.c to be specific) and
saw this in function prototypes

static eval_error logical_or_term _((eval_token, eval_t *));
__________________________________^

what is this underscore for?


Underscore is a valid character for an identifier. Admitedly it's not
usual to just have _ as a name, but that's presumably why it's used.

In this case, you should find it in a #define in a header file
somewhere, defining a macro. This is used to switch function prototype
arguments off for pre-ISO compilers, something like:

#ifdef NO_PROTOTYPES
#define _(x) ()
#else
#define _(x) x
#endif

Thus if NO_PROTOTYPES is defined, the prototype you quote will be

static eval_error logical_or_term ();

otherwise (normally now) it will be

static eval_error logical_or_term (eval_token, eval_t *);

Chris C
Nov 14 '05 #3

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

Similar topics

5
by: Walter Tross | last post by:
Somebody with a very regulatory mind in this newsgroup has written that it's better not to use a leading underscore for class member names, because names with a leading underscore are used...
10
by: Axter | last post by:
Section 17.4.3.1.2 states that each name that begins with an underscore is reserved to the implementation for use as a name in the global namespace. Exactly what defines the implementation? ...
0
by: christopher keller | last post by:
Hello, Using MS Access 97, SR2 mit MDAC 2.7 / 2.8 English/Deutsch we get the old problem of 'object not found' in DB2 Connect Version 8. ( From MS KB Q129814: "When you try to attach a DB2...
5
by: Rich | last post by:
I typed &myBtn to display the underscore line on the first letter of <u>M</u> of myBtn. I can invoke &myBtn by pressing alt-m on the keyboard. But the underscore is not showing up. Is there a...
1
by: Kanon | last post by:
Hi, I hope this is the proper newsgroup for this kind of question. I have just started to learn about RSS and made my first feed: http://www.herbaloutfitters.com/pbw/alpha/rss/1-1.xml Some...
19
by: ok | last post by:
I came across some variable name like __gc_context. I started thinking a bit if I should tell the author of that code that names starting with underscores are reserved for the implementation. I...
16
by: Jim Langston | last post by:
I know that functions starting with an underscore, or two underscores, are reserved by the compiler/c++ and should not be used by the user and may cause undefined behavior. My question is, how...
14
by: Bit Byte | last post by:
I have the following struct: typedef struct { string symbol; string synonym; Synonym(string _synonym, string _symbol) { synonym = _synonym; symbol = _symbol; }
13
by: PromisedOyster | last post by:
Many in our development team have came from a C++ background and are in the practice of prefixing private class variables with an underscore to improve readability and avoid naming collisions with...
1
by: Barkster | last post by:
I have a field that contains an underscore. How can I do a query for the underscore since I just found that underscore really doesn't find underscore it is a wildcard in mysql. I need to be able...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.