473,394 Members | 1,742 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,394 software developers and data experts.

NO_EXT_KEYS and strict ISO/ANSI modes

Hi,

Open Watcom C defines NO_EXT_KEYS if you use it with -za ("disable
extensions (i.e., accept only ISO/ANSI C)"), but isn't this a
contradiction in itself; it's not in the implementation defined namespace
after all.

This code for example

int foo(void)
{
return NO_EXT_KEYS;
}

compiles happily. As far as I understand though this macro has been there
for a long time for MS compatibility so it can't be that easily removed.

My question is: do recent MS C compilers or other common compilers still
define this macro too? I just know that GCC doesn't -- it defines
__STRICT_ANSI__ instead.

We are considering to remove its definition from Open Watcom for the new
-za99 switch, well C99 support is far from complete but a switch similar
to GCC's -std=c99 is still needed.

Bart

Nov 14 '05 #1
2 1682

"Bart Oldeman" <ba*********@NOSPAMusers.sourceforge.net> a écrit dans le
message de
news:Pi**************************************@pg5. enm.bris.ac.uk...
Hi,
Hi,

Open Watcom C defines NO_EXT_KEYS if you use it with -za ("disable
extensions (i.e., accept only ISO/ANSI C)"), but isn't this a
contradiction in itself; it's not in the implementation defined namespace
after all.
It's off-topic here since ISO C doesn't define NO_EXT_KEYS, but see below...

This code for example

int foo(void)
{
return NO_EXT_KEYS;
}
compiles happily. As far as I understand though this macro has been there
for a long time for MS compatibility so it can't be that easily removed.

My question is: do recent MS C compilers or other common compilers still
define this macro too? I just know that GCC doesn't -- it defines
__STRICT_ANSI__ instead.


I specified the option flag /Za and tried to compiled code below with MSVC
6.0 (cl version : 12.00.8168) which is not a recent MS compiler anymore:

/*1:*/ int main(void)
/*2:*/ {
/*3:*/ return NO_EXT_KEYS;
/*4:*/ }
/*5:*/

and got:
c:\main.c(3) : error C2065: 'NO_EXT_KEYS' : undeclared identifier

I took a look at my MSDN documentation and found that NO_EXT_KEYS was
defined only if /Za was specified, but for 16-bit versions of the MS
compiler cl. It's not clear in the doc but it appears that this macro did'nt
subsist anymore in 32-bit versions of cl.

Regis
Nov 14 '05 #2
Régis Troadec <re**@wanadoo.fr> wrote:
"Bart Oldeman" <ba*********@NOSPAMusers.sourceforge.net> a écrit dans
le message de
news:Pi**************************************@pg5. enm.bris.ac.uk...
Open Watcom C defines NO_EXT_KEYS if you use it with -za ("disable
extensions (i.e., accept only ISO/ANSI C)"), but isn't this a
contradiction in itself; it's not in the implementation defined
namespace after all.
It's off-topic here since ISO C doesn't define NO_EXT_KEYS, but see
below...

[...]
My question is: do recent MS C compilers or other common compilers
still define this macro too? I just know that GCC doesn't -- it
defines __STRICT_ANSI__ instead.

[...] I took a look at my MSDN documentation and found that NO_EXT_KEYS was
defined only if /Za was specified, but for 16-bit versions of the MS
compiler cl. It's not clear in the doc but it appears that this macro
did'nt subsist anymore in 32-bit versions of cl.

That does seem to be the case. See http://support.microsoft.com/?kbid=65472
KB65472--"INFO: Predefined Identifiers in Microsoft C and C++". NO_EXT_KEYS
is in the "16-Bit Specific" section.
--
Alan J. McFarlane
http://homepage.ntlworld.com/alanjmcf/
Please follow-up in the newsgroup for the benefit of all.
Nov 14 '05 #3

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

Similar topics

5
by: simon place | last post by:
is the code below meant to produce rubbish?, i had expected an exception. f=file('readme.txt','w') f.write(' ') f.read() ( PythonWin 2.3 (#46, Jul 29 2003, 18:54:32) on win32. ) I got...
23
by: chris Jangelov | last post by:
It seems that opening a link in a new window isn't considered to be good practise in xhtml 1.1. The w3c validation service does not accept it and I have to downgrade those pages to...
0
by: mkoleno346 | last post by:
If I want to change autentication modes for an instance of MSDE that I already installed, what is the best way to go about this? I don't think you can change authentication modes using any of the...
2
by: Gaurav Vaish | last post by:
Hi, How can I accomplish multiple authentication modes in one application? I have the following scenario: - A company, X, has some employees - Those on rolls have an AD account - Those...
1
by: Sunny | last post by:
Hi guys, I am using NVdia Geforce4 MX series graphics card for my dual monitor setup. There are different modes available for dual display (e.g clone mode ,span mode). These modes can be...
17
by: David | last post by:
Hi all, I have the following problem: my program works fine, but when I add option strict at the top of the form, the following sub fails with an error that option strict does not allow late...
5
by: mmxbass | last post by:
In Visual Studio 2005, how can I set my project to be a strict ANSI-C project with absoloutly nothing else? I don't want my project to even compile if it contains any C++ or non-ANSI code.
9
by: Jacek Dziedzic | last post by:
Hi! I often find that my programs need to store information on "current mode of something" with two or at most several mutually exclusive "modes" to choose from, e.g. - datafile: is it in a)...
3
by: Rebeus87 | last post by:
Hi i am new to Perl and i was wondering if you could look at my scripts and give me advice and feedback on how i could improve my scripts. I am using /etc/fb.modes to write Perl scripts. ...
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: 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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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:
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
tracyyun
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...

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.