Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

difference between C++ and C compiler

33 views
Skip to first unread message

Lynn McGuire

unread,
Jan 5, 2012, 8:36:51 PM1/5/12
to
Why does this code compile cleanly in the wpp386 compiler

#pragma aux my_common_prag "^";
int __pragma ("my_common_prag") config_testmode;

and not in the wcc386 compiler ?

Thanks,
Lynn

Uwe Schmelich

unread,
Jan 6, 2012, 9:51:05 AM1/6/12
to
Perhaps because in the "Open Watcom 1.9 C/C++ User's Guide Help" under "OW
C/C++ Extended Keywords" for __pragma we read "OW C++ supports .." instead
of "OW C/C++ supports .." like for most other __-keywords.
So maybe it's not implemented for C. Don't know the reason why not.

Uwe

Paul S. Person

unread,
Jan 6, 2012, 12:45:06 PM1/6/12
to
On Fri, 06 Jan 2012 15:51:05 +0100, Uwe Schmelich <p5l...@snafu.de>
wrote:
Since it involves inlining, perhaps it was not added to C when
inlining was added.
--
"Nature must be explained in
her own terms through
the experience of our senses."

Lynn McGuire

unread,
Jan 6, 2012, 10:02:01 PM1/6/12
to
On 1/6/2012 11:45 AM, Paul S. Person wrote:
> On Fri, 06 Jan 2012 15:51:05 +0100, Uwe Schmelich<p5l...@snafu.de>
> wrote:
>
>> Lynn McGuire wrote:
>>
>>> Why does this code compile cleanly in the wpp386 compiler
>>>
>>> #pragma aux my_common_prag "^";
>>> int __pragma ("my_common_prag") config_testmode;
>>>
>>> and not in the wcc386 compiler ?
>>>
>>> Thanks,
>>> Lynn
>>
>> Perhaps because in the "Open Watcom 1.9 C/C++ User's Guide Help" under "OW
>> C/C++ Extended Keywords" for __pragma we read "OW C++ supports .." instead
>> of "OW C/C++ supports .." like for most other __-keywords.
>> So maybe it's not implemented for C. Don't know the reason why not.
>
> Since it involves inlining, perhaps it was not added to C when
> inlining was added.

Bummer, Thanks !

Lynn

0 new messages