Are there standard macros that a (c99) compliant compiler should support?
I note that in the c99 std that __FILE__ __LINE__ __func__ are
mentioned, but others (that seem to be built in to every compiler I
currently use) like __DATE__ __TIME___ don't appear. Presumably,
__TIME__ etc are just simply 'popular' rather than required? 15 1624
pemo said: Are there standard macros that a (c99) compliant compiler should support?
I note that in the c99 std that __FILE__ __LINE__ __func__ are mentioned, but others (that seem to be built in to every compiler I currently use) like __DATE__ __TIME___ don't appear.
Look harder. They are both there.
--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999 http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
"Richard Heathfield" <in*****@invali d.invalid> wrote in message
news:dm******** **@nwrdmz02.dmz .ncs.ea.ibs-infra.bt.com... pemo said:
Are there standard macros that a (c99) compliant compiler should support?
I note that in the c99 std that __FILE__ __LINE__ __func__ are mentioned, but others (that seem to be built in to every compiler I currently use) like __DATE__ __TIME___ don't appear.
Look harder. They are both there.
So they are!
Interesting - when given __, acrobat reader, finds 7.2.2 (__FILE__ etc),
but nothing else - however, give it DATE, and it finds 6.10.8 - containing
__DATE__ etc! Weird
in comp.lang.c i read: Are there standard macros that a (c99) compliant compiler should support?
yes. the standard enumerates them.
I note that in the c99 std that __FILE__ __LINE__ __func__ are mentioned,
__func__ isn't a macro.
but others (that seem to be built in to every compiler I currently use) like __DATE__ __TIME___ don't appear. Presumably, __TIME__ etc are just simply 'popular' rather than required?
they are in the list -- see 6.10.8 for the basic list you are after.
--
a signature
pemo wrote: "Richard Heathfield" <in*****@invali d.invalid> wrote in message news:dm******** **@nwrdmz02.dmz .ncs.ea.ibs-infra.bt.com...
pemo said:
Are there standard macros that a (c99) compliant compiler should support?
I note that in the c99 std that __FILE__ __LINE__ __func__ are mentioned, but others (that seem to be built in to every compiler I currently use) like __DATE__ __TIME___ don't appear.
Look harder. They are both there.
So they are!
Interesting - when given __, acrobat reader, finds 7.2.2 (__FILE__ etc), but nothing else - however, give it DATE, and it finds 6.10.8 - containing __DATE__ etc! Weird
Yep; in most cases, a plain text file is better for searching.
I keep the relevant last public draft around in this form just
for this reason. After finding something there, I still can
look into the standard to verify the information from the draft.
Cheers
Michael
--
E-Mail: Mine is an /at/ gmx /dot/ de address.
Michael Mair <Mi**********@i nvalid.invalid> writes: pemo wrote: "Richard Heathfield" <in*****@invali d.invalid> wrote in message news:dm******** **@nwrdmz02.dmz .ncs.ea.ibs-infra.bt.com...
pemo said:
Are there standard macros that a (c99) compliant compiler should support?
I note that in the c99 std that __FILE__ __LINE__ __func__ are mentioned , but others (that seem to be built in to every compiler I currently use) like __DATE__ __TIME___ don't appear.
Look harder. They are both there. So they are! Interesting - when given __, acrobat reader, finds 7.2.2 (__FILE__ etc), but nothing else - however, give it DATE, and it finds 6.10.8 - containing __DATE__ etc! Weird
Yep; in most cases, a plain text file is better for searching. I keep the relevant last public draft around in this form just for this reason. After finding something there, I still can look into the standard to verify the information from the draft.
Note that the standard, even in its PDF version, still has an
old-fashioned section at the end called an "index", where you'll find
a number of identifiers starting with "__".
--
Keith Thompson (The_Other_Keit h) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
"Michael Mair" <Mi**********@i nvalid.invalid> wrote in message
news:3v******** *****@individua l.net... pemo wrote: "Richard Heathfield" <in*****@invali d.invalid> wrote in message news:dm******** **@nwrdmz02.dmz .ncs.ea.ibs-infra.bt.com...
pemo said:
Are there standard macros that a (c99) compliant compiler should support?
I note that in the c99 std that __FILE__ __LINE__ __func__ are mentioned , but others (that seem to be built in to every compiler I currently use) like __DATE__ __TIME___ don't appear.
Look harder. They are both there.
So they are!
Interesting - when given __, acrobat reader, finds 7.2.2 (__FILE__ etc), but nothing else - however, give it DATE, and it finds 6.10.8 - containing __DATE__ etc! Weird
Yep; in most cases, a plain text file is better for searching. I keep the relevant last public draft around in this form just for this reason. After finding something there, I still can look into the standard to verify the information from the draft.
Hmmm - must check to see if Acrobat files can be saved as 'test' - the
search facility in Acrobat can only get better - can't it??
"Keith Thompson" <ks***@mib.or g> wrote in message
news:ln******** ****@nuthaus.mi b.org... Michael Mair <Mi**********@i nvalid.invalid> writes: pemo wrote: "Richard Heathfield" <in*****@invali d.invalid> wrote in message news:dm******** **@nwrdmz02.dmz .ncs.ea.ibs-infra.bt.com...
pemo said:
>Are there standard macros that a (c99) compliant compiler should >support? > >I note that in the c99 std that __FILE__ __LINE__ __func__ are >mentione d, but others (that seem to be built in to every compiler I >currentl y use) like __DATE__ __TIME___ don't appear.
Look harder. They are both there. So they are! Interesting - when given __, acrobat reader, finds 7.2.2 (__FILE__ etc), but nothing else - however, give it DATE, and it finds 6.10.8 - containing __DATE__ etc! Weird
Yep; in most cases, a plain text file is better for searching. I keep the relevant last public draft around in this form just for this reason. After finding something there, I still can look into the standard to verify the information from the draft.
Note that the standard, even in its PDF version, still has an old-fashioned section at the end called an "index", where you'll find a number of identifiers starting with "__".
Yup, you're right Keith - sometimes I think (realise!) that despite all my
years/education - well - I'm basically pretty dumb ... or, yet another way
to look at that ... I should at least try everything in the book *before* I
ask such stuff. MEMO TO SELF!
Keith Thompson wrote: Michael Mair <Mi**********@i nvalid.invalid> writes:
pemo wrote:
"Richard Heathfield" <in*****@invali d.invalid> wrote in message news:dm***** *****@nwrdmz02. dmz.ncs.ea.ibs-infra.bt.com...
pemo said: >Are there standard macros that a (c99) compliant compiler should support? > >I note that in the c99 std that __FILE__ __LINE__ __func__ are >mentione d, but others (that seem to be built in to every compiler I >currentl y use) like __DATE__ __TIME___ don't appear.
Look harder. They are both there.
So they are! Interestin g - when given __, acrobat reader, finds 7.2.2 (__FILE__ etc), but nothing else - however, give it DATE, and it finds 6.10.8 - containing __DATE__ etc! Weird
Yep; in most cases, a plain text file is better for searching. I keep the relevant last public draft around in this form just for this reason. After finding something there, I still can look into the standard to verify the information from the draft.
Note that the standard, even in its PDF version, still has an old-fashioned section at the end called an "index", where you'll find a number of identifiers starting with "__".
*g* Yep, should have mentioned this curious device.
However, even though the standard's index is rather complete,
it is still a technical book and suffers in part from the
useless index syndrome: You often have to know the answer and part
of the wording used in the answer to find the answer when using
index and table of contents. (The only technical book with an
index that could -- with one level of indirection, of course --
up to now answer all my questions is the second edition of the
LaTeX Companion; this is in part because I did not use it much
but in part because the team of authors had a pro making the index.)
If the author or the team writing the book does not aim at an
excellent index from the beginning, then the index often is the
part which suffers when time and money grow short...
Whenever I write some technical text where I am not bound to use
a well-known text "processing " tool out of Redmond, the index
indeed is part of the writing process. This way, I have only to
weed out the unnecessary parts; in addition, I ask friends to
"ask" the text questions and try to answer them in a couple of
minutes using the index.
Cheers
Michael
--
E-Mail: Mine is an /at/ gmx /dot/ de address.
On Thu, 01 Dec 2005 23:38:01 +0100, in comp.lang.c , Michael Mair
<Mi**********@i nvalid.invalid> wrote: Yep; in most cases, a plain text file is better for searching.
You guys must have badly broken PDF readers :-)
I find the pdf just fine to search, takes about 2 seconds to search
the whole thing, and no problems finding all the things we've talked
about here.
--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.ungerhu.com/jxh/clc.welcome.txt >
----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==---- http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =---- This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Steven T. Hatton |
last post by:
Now that I have a better grasp of the scope and capabilities of the C++
Standard Library, I understand that products such as Qt actually provide
much of the same functionality through their own libraries. I'm not sure
if that's a good thing or not. AFAIK, most of Qt is compatable with the
Standard Library. That is, QLT can interoperate with STL, and you can
convert back and forth between std::string and Qt::QString, etc.
Are there any...
|
by: Kevin Goodsell |
last post by:
I've found something that looks like an error in n869. Can anyone with
the actual standard tell me if it's different there? I'd also be
interested if anyone knows of a defect report addressing this.
The apparent error is in section 7.23.1, paragraphs 1 and 2. Paragraph 1
says:
The header <time.h> defines *four* macros, and declares
several types and functions for manipulating time.
|
by: Kristian Nybo |
last post by:
Hi,
I'm writing a simple image file exporter as part of a school project,
and I would like to write completely platform-independent code if at all
possible. The problem I've run into is that apparently there's no
guarantee that a particular implementation will have a data type that is
exactly 8 bits wide; char is only guaranteed to be at least 8 bits.
Correct me if I'm wrong, but I assume that if CHAR_BIT happens to be,
say, 9, writing...
|
by: Neil Zanella |
last post by:
Hello all,
In C and C++ a primitive data type is represented by a minimum number
of bits as defined by the corresponding standard. For instance an int
is assumed to be at least 16 bits on all platform where in practice
an int is 16 bits on the arcane 16 bit machines and 32 bits on the
most commonly used 32 bit machines.
However, my C# reference says that an int in C# is always 32 bits wide.
It also specifies a specific number of bits...
|
by: copx |
last post by:
Is there are standard way to detect which C standard is supported by the
compiler?
I mean for conditional compilation like:
#if defined(C99)
# include "stdint.h"
#endif
| |
by: lovecreatesbeauty |
last post by:
Why the C standard committee doesn't provide a standard implementation
including the C compiler and library when the language standard
document is published?
C works on the abstract model of low level machine. C stands for
portability and platform and machine independent. If the C compiler and
C standard library are written in C itself, is it possible that one
"standard" C compiler plus library is enough? The standard
implementation is...
|
by: toton |
last post by:
Hi,
Here are a few of my questions, just to know what C++ standard says
(I don't have a standard manual :( ) , not the platform specific task.
May be an one liner answer (even one word answer ) is good.
1) Is RTTI (i.e dynamic_cast etc ) are optional , like as in MSVC it
need to be enabled, or always present.
2) what is type of char (and wchar_t) signed or unsigned ?
3) size_t is in namespace std or may be outsize also (in C++, not in
C)...
|
by: J de Boyne Pollard |
last post by:
MThe library functions which are included to allow process
Mlaunch, forking, and termination, imply that it is both
Mpossible and desirable for a process to fork itself. This is
Ma fundamental part of the Unix thought process, but is
Mnot essential for a working OS.
There are no Standard C Library functions for process forking or
overlaying. The fork() and execve() functions are part of the C
language bindings to POSIX. They are not...
|
by: jacob navia |
last post by:
In my "Happy Christmas" message, I proposed a function to read
a file into a RAM buffer and return that buffer or NULL if
the file doesn't exist or some other error is found.
It is interesting to see that the answers to that message prove that
programming exclusively in standard C is completely impossible even
for a small and ridiculously simple program like the one I proposed.
1 I read the file contents in binary mode, what should...
|
by: Stephen Horne |
last post by:
I've been using Visual C++ 2003 for some time, and recently started
working on making my code compile in GCC and MinGW. I hit on lots of
unexpected problems which boil down to the same template issue. A
noddy mixin layer example should illustrate the issue...
class Base
{
protected:
int m_Field;
|
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: 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: 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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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: 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 we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
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...
| |