Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Exceptions in C/C++

Reply
Thread Tools

Exceptions in C/C++

 
 
CBFalconer
Guest
Posts: n/a
 
      12-08-2007
jacob navia wrote:
> CBFalconer wrote:
>> jacob navia wrote:
>>> http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
>>>
>>>> Rather than using extensions that tie your code to a particular
>>>> compiler and platform, why not use the perfectly good exception-
>>>> handling features already present in standard C, namely setjmp()/
>>>> longjmp()?
>>>
>>> because they do not do what exceptions do.

>>
>> Aha. Now you may be beginning to see why exceptions (as built into
>> the language) are off-topic on c.l.c. Hint: try c.l.c++, which
>> handles a language with such a feature.

>
> It is not off topic. It is about exceptions in C.


There are no such things as 'exceptions' in C. Thus off-topic.
See section 7.6.2 for the meaning of 'exception' in C.

... further annoying comments designed to start fights snipped ..

--
Chuck F (cbfalconer at maineline dot net)
<http://cbfalconer.home.att.net>
Try the download section.



--
Posted via a free Usenet account from http://www.teranews.com

 
Reply With Quote
 
 
 
 
Richard Heathfield
Guest
Posts: n/a
 
      12-08-2007
jacob navia said:

> Flash Gordon wrote:
>> jacob navia wrote, On 08/12/07 12:18:
>>
>>> And if you do not like a subject, just skip it.

>>
>> If you don't like the subject of the group then just skip the group.

>
> The subject of the group is C.


Correct.

> Nowhere in the charter was mentioned that it was just ISO C.


That's at least partly because there isn't a charter, as you have been told
many times. But it's also because, when C programmers subscribe to a C
group, it is not unreasonable of them to expect to be able to recognise
the language being discussed, and that means treading very carefully with
extensions. If "C" means "any language with a vaguely C-like syntax" or
"any program acceptable to any compiler that can compile C", then Fortran
and C++ become topical here. Is that what you want?

A few weeks ago the group discussed topicality and whether they would like
it to change, and the overwhelming majority stated that they wished the
group to continue to restrict itself to K&R C and the various ISO
standards. If you wanted to loosen up the topicality requirements of this
group, that would have been a great time to make yourself heard, but IIRC
you did not do so. Even if you had taken part, however, you would have
been in the minority (as was I).

--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
 
Reply With Quote
 
 
 
 
Flash Gordon
Guest
Posts: n/a
 
      12-08-2007
jacob navia wrote, On 08/12/07 14:16:
> Flash Gordon wrote:
>> jacob navia wrote, On 08/12/07 12:18:
>>> CBFalconer wrote:
>>>> jacob navia wrote:
>>>>> (E-Mail Removed) wrote:
>>>>>
>>>>>> Rather than using extensions that tie your code to a particular
>>>>>> compiler and platform, why not use the perfectly good exception-
>>>>>> handling features already present in standard C, namely setjmp()/
>>>>>> longjmp()?
>>>>> because they do not do what exceptions do.
>>>>
>>>> Aha. Now you may be beginning to see why exceptions (as built into
>>>> the language) are off-topic on c.l.c. Hint: try c.l.c++, which
>>>> handles a language with such a feature.
>>>
>>> It is not off topic. It is about exceptions in C.
>>>
>>> Clear?

>>
>> OK, the answer is easy then, there aren't any.


<snip>

>> Suggesting switching to a compiler specific extension provided by a
>> couple of other compilers does *not* answer the OPs question.


I see you fail to address the point that your answer was irrelevant to
the question being asked.

>>> And if you do not like a subject, just skip it.

>>
>> If you don't like the subject of the group then just skip the group.

>
> The subject of the group is C. Nowhere in the charter was mentioned
> that it was just ISO C.


The group ducked billed platypus also fails to mention it, possibly
because neither exist. However, extensions are not part of C, they are
extensions, that is why they are called extensions.

> Microsoft, lcc-win, and other compilers under windows implement
> __try/__except. And if you do not like it it is your problem, not
> mine. It is a common extension under windows.


It is not available on any gcc variant under Windows that I am aware of,
I can't see it in the documentation for tcc. So that is two all
(counting all the gcc implementations for Windows as one). I could
easily find more (I have others in mind, I just can't be bothered to
check the documentation of them all).

Also this group is not Windows specific the last time I checked, and I
don't think it is a common extension to C when you look across the full
range of C implementations rather than the small subset that covers Windows.

The extension is off topic here, and the OP did not want to use your
compiler or the MS one, he wanted to use one that did not support the
extension.


Personally I would actually like a suitable try/catch mechanism added to
C, but my preferences to not control what is part of C.
--
Flash Gordon
 
Reply With Quote
 
Tor Rustad
Guest
Posts: n/a
 
      12-09-2007
(E-Mail Removed) wrote:
>
> On 7 Gru, 01:58, Tor Rustad <(E-Mail Removed)> wrote:
>> It's not ISO C, but Microsoft specific C, see their MSDN doc.

>
> So if I want to use exceptions catching in dev-cpp in C code then what
> should I do?


If you are writing new code, it's better to avoid it and use standard C
methods for error handling.

If you are trying to compile some existing source, you could look into
an existing C library for ideas, see for example David R. Hanson CII
library, which came with his book "C Interfaces and Implementations".

My guess, is that it wouldn't be hard to rewrite the code.

--
Tor <(E-Mail Removed) | tr i-za-h a-z>
 
Reply With Quote
 
Keith Thompson
Guest
Posts: n/a
 
      12-09-2007
jacob navia <(E-Mail Removed)> writes:
[...]
> The subject of the group is C. Nowhere in the charter was mentioned
> that it was just ISO C.

[...]

This newsgroup has no charter.

I know you've been told that a number of times. Apparently you just
haven't been told *enough* times. Let me know how many times you need
to be told that this newsgroup has no charter before you believe it,
and I'll be glad to send you an e-mail message that repeats the
statement "comp.lang.c has no charter" that many itmes.

--
Keith Thompson (The_Other_Keith) <(E-Mail Removed)>
Looking for software development work in the San Diego area.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
 
Reply With Quote
 
jacob navia
Guest
Posts: n/a
 
      12-09-2007
Keith Thompson wrote:
> jacob navia <(E-Mail Removed)> writes:
> [...]
>> The subject of the group is C. Nowhere in the charter was mentioned
>> that it was just ISO C.

> [...]
>
> This newsgroup has no charter.
>
> I know you've been told that a number of times. Apparently you just
> haven't been told *enough* times. Let me know how many times you need
> to be told that this newsgroup has no charter before you believe it,
> and I'll be glad to send you an e-mail message that repeats the
> statement "comp.lang.c has no charter" that many itmes.
>


Newsgroups : net.news.group, net.lang.c
From : eagle!jerry
Date : Fri Oct 22 01:28:04 1982
Local : Ven 22 oct 1982 01:28
Subject : C language newsgroup started

My suggestion for a "C" newsgroup met with support and no
opposition so net.lang.c (note lower case) has been created.

It's purpose is to carry on discussion of C programming and
the C programming language. Appropriate topics are

Queries on how to write something in C
Queries about why some C code behaves the way it does
Suggestions for C modifications or extensions
C coding "tricks"
Compiler bugs
Availability of compilers
etc.

Jerry Schwarz
BTL -- Murray Hill
harpo!eagle!jerry

This is the charter as I have told you countless times.
Please tell me how many times you need yet.

--
jacob navia
jacob at jacob point remcomp point fr
logiciels/informatique
http://www.cs.virginia.edu/~lcc-win32
 
Reply With Quote
 
Richard Heathfield
Guest
Posts: n/a
 
      12-09-2007
jacob navia said:

> Keith Thompson wrote:
>> jacob navia <(E-Mail Removed)> writes:
>> [...]
>>> The subject of the group is C. Nowhere in the charter was mentioned
>>> that it was just ISO C.

>> [...]
>>
>> This newsgroup has no charter.
>>
>> I know you've been told that a number of times. Apparently you just
>> haven't been told *enough* times. Let me know how many times you need
>> to be told that this newsgroup has no charter before you believe it,
>> and I'll be glad to send you an e-mail message that repeats the
>> statement "comp.lang.c has no charter" that many itmes.
>>

>
> Newsgroups : net.news.group, net.lang.c
> From : eagle!jerry


Refer to the discussion we had the last time you trotted this out.

<snip>

> This is the charter as I have told you countless times.


No, it isn't, as we have told you countless times.

--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
 
Reply With Quote
 
Richard
Guest
Posts: n/a
 
      12-09-2007
Keith Thompson <(E-Mail Removed)> writes:

> jacob navia <(E-Mail Removed)> writes:
> [...]
>> The subject of the group is C. Nowhere in the charter was mentioned
>> that it was just ISO C.

> [...]
>
> This newsgroup has no charter.
>
> I know you've been told that a number of times. Apparently you just
> haven't been told *enough* times. Let me know how many times you need
> to be told that this newsgroup has no charter before you believe it,
> and I'll be glad to send you an e-mail message that repeats the
> statement "comp.lang.c has no charter" that many itmes.


The how come you and Heathfield seem to know so much about what can and
can not be posted? comp.lang.c. computers-language-c.

Some flexibility does no harm. It's why God gave us a brain and
newsreaders with "kill thread" functionality.

 
Reply With Quote
 
jacob navia
Guest
Posts: n/a
 
      12-09-2007
Richard Heathfield wrote:
> jacob navia said:
>
>> Keith Thompson wrote:
>>> jacob navia <(E-Mail Removed)> writes:
>>> [...]
>>>> The subject of the group is C. Nowhere in the charter was mentioned
>>>> that it was just ISO C.
>>> [...]
>>>
>>> This newsgroup has no charter.
>>>
>>> I know you've been told that a number of times. Apparently you just
>>> haven't been told *enough* times. Let me know how many times you need
>>> to be told that this newsgroup has no charter before you believe it,
>>> and I'll be glad to send you an e-mail message that repeats the
>>> statement "comp.lang.c has no charter" that many itmes.
>>>

>> Newsgroups : net.news.group, net.lang.c
>> From : eagle!jerry

>
> Refer to the discussion we had the last time you trotted this out.
>
> <snip>
>
>> This is the charter as I have told you countless times.

>
> No, it isn't, as we have told you countless times.
>


Who are you?

With what authority you tell me what the charter is?

At least I can present a document that is the charter according
to the founders of this group.

You can't.

You have just *your opinion* and the opinion of *your friends*.

I do not care about your opinion, neither the opinion of
your friends. And I do not give a dam either about your
insults campaign, done with anonymous posts.

Nobody has given you ANY authority to supervise this group. So you
either ignore my posts (your option) or you accept to discuss
about the ISSUES as I do.

Nowhere you say your opinion about exceptions in C, nor why
my proposed changes are wrong, nor anything of value.

All your posts are a sterile whining about "off topic"

!!!


--
jacob navia
jacob at jacob point remcomp point fr
logiciels/informatique
http://www.cs.virginia.edu/~lcc-win32
 
Reply With Quote
 
James Kuyper
Guest
Posts: n/a
 
      12-09-2007
jacob navia wrote:
> Richard Heathfield wrote:
>> jacob navia said:

....
>>> This is the charter as I have told you countless times.

>>
>> No, it isn't, as we have told you countless times.
>>

>
> Who are you?


Who does he have to be, and by what authority do you require him to have
any particular identity?

> With what authority you tell me what the charter is?


What authority does he need to possess to point out flaws in your
argument? I thought that was the inherent right of all human beings.

> At least I can present a document that is the charter according
> to the founders of this group.


The message you cited doesn't even contain the word "charter". To count
as a charter it should be publicly proposed, discussed, and voted on,
and the very message that you've cited implies that no such formal
process was used in this case.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Exceptions - How do you make it work like built-in exceptions? Lie Python 3 01-14-2008 06:45 PM
Exceptions + Performance on path without exceptions gratch06@gmail.com C++ 3 04-16-2007 08:52 PM
Checked exceptions vs unchecked exceptions Ahmed Moustafa Java 5 07-14-2004 01:46 PM
ImageList Errors - Exceptions and...need HELP Herr Lucifer ASP .Net 0 06-21-2004 10:21 AM
Custom exceptions -- inherit from exceptions.Exception? Paul Miller Python 3 11-12-2003 09:24 AM



Advertisments