Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Has Implicit Int been disabled in the new C11 standard? What aboutother previously depreciated constructions eg gets?

Reply
Thread Tools

Has Implicit Int been disabled in the new C11 standard? What aboutother previously depreciated constructions eg gets?

 
 
Lord Voldermort
Guest
Posts: n/a
 
      02-18-2012
As per subject.

Thanks.

Tom R.
 
Reply With Quote
 
 
 
 
Lord Voldermort
Guest
Posts: n/a
 
      02-18-2012
Lord Voldermort writes:
> As per subject.
>
> Thanks.
>
> Tom R.


*BUMP*

Anyone able to answer this q?
 
Reply With Quote
 
 
 
 
Ben Bacarisse
Guest
Posts: n/a
 
      02-18-2012
Lord Voldermort <> writes:

> Lord Voldermort writes:
>> As per subject.
>>
>> Thanks.
>>
>> Tom R.

>
> *BUMP*
>
> Anyone able to answer this q?


I'd have a go if I knew what you meant by "disabled". By the way, 18
minutes is not a long time on Usenet, and "bumping" a thread usually
just annoys people.

--
Ben.
 
Reply With Quote
 
Keith Thompson
Guest
Posts: n/a
 
      02-18-2012
Lord Voldermort <> writes:
> As per subject.
>
> Thanks.
>
> Tom R.


This is Usenet, not a web form or chat room. I suggest reading
some of the other articles posted here to get a feeling for the
best style.

Please put your question in the body of the post, not just in
the title.

Posting again after 18 minutes to "bump" the original post is not
useful. If you don't get a response after a day or so, it *might*
be time to worry.

Your actual questions, copied from the title:

> Has Implicit Int been disabled in the new C11 standard?


Implicit int was removed from the language by the C99 standard.
(C11 did not restore it.) Many, probably most, C compilers still
support it as an extension (or just because they don't yet conform
to C99).

> What about other previously depreciated constructions eg gets?


The gets function was removed completely.

I'm not aware of any other deprecated (note spelling) features that were
removed by C11. In particular, old-style function declarations and
definitions are still in the language.

You can get a draft, nearly equivalent to the final C11 standard, at
<http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf>.

--
Keith Thompson (The_Other_Keith) kst- <http://www.ghoti.net/~kst>
Will write code for food.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
 
Reply With Quote
 
Kaz Kylheku
Guest
Posts: n/a
 
      02-19-2012
On 2012-02-18, Lord Voldermort <> wrote:
> Lord Voldermort writes:
>> As per subject.
>>
>> Thanks.
>>
>> Tom R.

>
> *BUMP*


Don't do this; Usenet is not a web bulletin board.
 
Reply With Quote
 
Lord Voldermort
Guest
Posts: n/a
 
      02-19-2012
Keith Thompson writes:
> Lord Voldermort <> writes:
>> As per subject.
>>
>> Thanks.
>>
>> Tom R.

>
> This is Usenet, not a web form or chat room. I suggest reading some of
> the other articles posted here to get a feeling for the best style.
>
> Please put your question in the body of the post, not just in the title.
>
> Posting again after 18 minutes to "bump" the original post is not
> useful. If you don't get a response after a day or so, it *might* be
> time to worry.
>
> Your actual questions, copied from the title:
>
>> Has Implicit Int been disabled in the new C11 standard?

>
> Implicit int was removed from the language by the C99 standard. (C11 did
> not restore it.) Many, probably most, C compilers still support it as
> an extension (or just because they don't yet conform to C99).
>
>> What about other previously depreciated constructions eg gets?

>
> The gets function was removed completely.
>
> I'm not aware of any other deprecated (note spelling) features that were
> removed by C11. In particular, old-style function declarations and
> definitions are still in the language.
>
> You can get a draft, nearly equivalent to the final C11 standard, at
> <http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf>.


Thx for the info Keiht, sorry about breech of protocol - didnt see a way
to tell how many ppl are in this room so didnt know whether it was empty
or ppl just missed my post.

So is there any translation program then to take code for the previous
standard and upgrade it to work with C11 (replace gets by fgets etc)?
 
Reply With Quote
 
Ben Bacarisse
Guest
Posts: n/a
 
      02-19-2012
Lord Voldermort <> writes:
<snip>

> Thx for the info Keiht, sorry about breech of protocol - didnt see a way
> to tell how many ppl are in this room so didnt know whether it was empty
> or ppl just missed my post.


Have a read of this: http://en.wikipedia.org/wiki/Usenet to get an
overview.

> So is there any translation program then to take code for the previous
> standard and upgrade it to work with C11 (replace gets by fgets etc)?


In a way, yes. Your compiler can help if you if you ask for conformance
to a specific standard. That is likely to flag up problems, but it
won't fix them, of course. Some, like calls to gets, can't be fixed
automatically because the problem is that the function just does not
have enough information to do a safe job. Each call needs to be looked
at by someone who understands the code.

If the code is very old (pre-C90, often called K&R C) you'd have to have
a good reason to update it because the move to prototypes alters the way
a function is called in subtle ways. If in doubt, ask about that
specifically.

--
Ben.
 
Reply With Quote
 
Lord Voldermort
Guest
Posts: n/a
 
      02-19-2012
Ben Bacarisse writes:
> Lord Voldermort <> writes: <snip>
>
>> Thx for the info Keiht, sorry about breech of protocol - didnt see a
>> way to tell how many ppl are in this room so didnt know whether it was
>> empty or ppl just missed my post.

>
> Have a read of this: http://en.wikipedia.org/wiki/Usenet to get an
> overview.


Didnt have time to read all that, but just flicking through I didnt see
anything about listing other people currently in this room/browsing the
forum/whatever you want to call it.

>> So is there any translation program then to take code for the previous
>> standard and upgrade it to work with C11 (replace gets by fgets etc)?

>
> In a way, yes. Your compiler can help if you if you ask for conformance
> to a specific standard. That is likely to flag up problems, but it
> won't fix them, of course. Some, like calls to gets, can't be fixed
> automatically because the problem is that the function just does not
> have enough information to do a safe job. Each call needs to be looked
> at by someone who understands the code.
>
> If the code is very old (pre-C90, often called K&R C) you'd have to have
> a good reason to update it because the move to prototypes alters the way
> a function is called in subtle ways. If in doubt, ask about that
> specifically.


Are you sure about this? Industry best practise is -- if possible, be
backwards compatable; if that can't be done, provide an automatic
updater. This has always been the case eg with Visual Basic.

It seems quite wreckless to update C while breaking existing programs and
leaving people to re-code manually!
 
Reply With Quote
 
Keith Thompson
Guest
Posts: n/a
 
      02-19-2012
Lord Voldermort <> writes:
> Ben Bacarisse writes:
>> Lord Voldermort <> writes: <snip>
>>> Thx for the info Keiht, sorry about breech of protocol - didnt see a
>>> way to tell how many ppl are in this room so didnt know whether it was
>>> empty or ppl just missed my post.

>>
>> Have a read of this: http://en.wikipedia.org/wiki/Usenet to get an
>> overview.

>
> Didnt have time to read all that, but just flicking through I didnt see
> anything about listing other people currently in this room/browsing the
> forum/whatever you want to call it.


There is no such feature. Don't think of this as a "room". A closer
metaphor might be distributed broadcast e-mail that anyone can read and
write.

I read your article on my own computer; there is no central server
that would know that. Your article was downloaded by the news
server I use (which happens to be news.eternal-september.org), but
that's just one of a number of news servers that share information
with each other. News servers transmit articles back and forth;
they don't track users. There is no central authority.

Usenet is older than the World Wide Web; early versions of it
didn't even use the Internet. (Modern implementations use the
NNTP protocol over TCP/IP.)

Hang around for a while; you'll get the hang of it.

>>> So is there any translation program then to take code for the previous
>>> standard and upgrade it to work with C11 (replace gets by fgets etc)?

>>
>> In a way, yes. Your compiler can help if you if you ask for conformance
>> to a specific standard. That is likely to flag up problems, but it
>> won't fix them, of course. Some, like calls to gets, can't be fixed
>> automatically because the problem is that the function just does not
>> have enough information to do a safe job. Each call needs to be looked
>> at by someone who understands the code.
>>
>> If the code is very old (pre-C90, often called K&R C) you'd have to have
>> a good reason to update it because the move to prototypes alters the way
>> a function is called in subtle ways. If in doubt, ask about that
>> specifically.

>
> Are you sure about this? Industry best practise is -- if possible, be
> backwards compatable; if that can't be done, provide an automatic
> updater. This has always been the case eg with Visual Basic.
>
> It seems quite wreckless to update C while breaking existing programs and
> leaving people to re-code manually!


The gets() function in particular is inherently unsafe. It should not
have been in the language in the first place, and programmers should
never have used it. That's why it was removed from C11. The only
programs that removing gets() might break were broken already, and those
programs *cannot* be fixed other than by manual recoding.

In any case, removing it from the standard doesn't magically remove it
from implementations. Implementers are still free to provide it as an
extension, or simply because they haven't yet fully implemented C11
(most C compilers haven't fully implemented C99 yet).

Note that some implementations already issue warnings for calls to
gets() (this particular warning is from the GNU linker):

c.c.text+0x52): warning: the `gets' function is dangerous and should not be used.

--
Keith Thompson (The_Other_Keith) kst- <http://www.ghoti.net/~kst>
Will write code for food.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
 
Reply With Quote
 
Geoff
Guest
Posts: n/a
 
      02-19-2012
On Sun, 19 Feb 2012 19:53:43 +0000 (UTC), Lord Voldermort
<> wrote:

>It seems quite wreckless to update C while breaking existing programs and
>leaving people to re-code manually!


Another aioe troll perhaps?

While it might be wreckless, it certainly isn't reckless to update the
C standard going forward. Revising the standard might break old
programs for compilation on new compilers but the medicine is more
beneficial than harmful.
 
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
I'm intrigued that Python has some functional constructions in the language. Casey Hawthorne Python 21 05-11-2009 07:56 AM
The printing has been stopped and this job has been add to the queu? dejola Computer Support 6 12-30-2005 03:26 AM
ASP.NET Forms Authentication - How to Know if User Has Previously Been Authenticated David Krussow ASP .Net 2 01-17-2005 05:19 PM
int main(int argc, char *argv[] ) vs int main(int argc, char **argv ) Hal Styli C Programming 14 01-20-2004 10:00 PM
dirty stuff: f(int,int) cast to f(struct{int,int}) Schnoffos C Programming 2 06-27-2003 03:13 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57