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? 2 1633
On 5 Jan 2005 05:29:09 -0800,
foaud167 <f.*******@gmai l.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
On 5 Jan 2005 05:29:09 -0800, foaud167
<f.*******@gmai l.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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 internally by
compilers (well, not so internally, since they appear in header
files).
I personally use the leading underscore (followed by a lower case
letter), which I consider to be much more readable than the trailing
underscore.
My reasoning is...
|
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?
Is it only narrowly defined by the compiler's internal name handling?
Or does it also include the library that comes with the compiler?
Does it include the OS library as part of the implementation?
|
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 table containing an
underscore (_) or a percent sign (%) in its name, you receive the
following error message". Cause: "The Microsoft Jet database engine
misinterprets the underscore or the percent sign. This causes the Jet
database engine to pass...
|
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 form property I need to set? How
can I make the underscore line show up?
Thanks,
Rich
|
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 newsreaders choked on it, however, so I ran it through
feedvalidator.org. This is the message I got:
line 15, column 68: XML parsing error: <unknown>:15:68: not well-formed
(invalid token)
| |
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 decided not
to because it would make me look like somebody who just wastes other
people's time instead of finding real bugs.
Come on, how serious should we take this rule? This wont ever be an issue
|
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 likely is it to actually
cause undefined behavior?
The reason I'm asking is I'm using a game engine where the sockets code is
not working correctly on my computer, but seems to work correctly on
everyone elses. I am not compiling the dll myself,...
|
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;
}
|
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 local variables
and parameters. This has become our standard.
ie private string _name;
as opposed to:
ie private string name;
|
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 to query for
the actual underscore. For example. Select Title where Title LIKE
'10_%' doesn't give me what I want.
Results
10_1
100_2
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |