Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #70600 > unrolled thread
| Started by | "Morten W. Petersen" <morphex@gmail.com> |
|---|---|
| First post | 2015-09-16 06:18 +0200 |
| Last post | 2015-09-17 17:06 +0200 |
| Articles | 20 on this page of 138 — 21 participants |
Back to article view | Back to comp.lang.c
Compiling C project for Windows and Mac OS X (GCC for Linux) "Morten W. Petersen" <morphex@gmail.com> - 2015-09-16 06:18 +0200
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Ian Collins <ian-news@hotmail.com> - 2015-09-16 17:06 +1200
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Noob <root@127.0.0.1> - 2015-09-16 08:00 +0200
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) David Brown <david.brown@hesbynett.no> - 2015-09-16 09:00 +0200
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-09-16 02:03 -0700
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) David Brown <david.brown@hesbynett.no> - 2015-09-16 11:20 +0200
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) "Morten W. Petersen" <morphex@gmail.com> - 2015-09-16 13:08 +0200
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) David Brown <david.brown@hesbynett.no> - 2015-09-16 13:26 +0200
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) "Morten W. Petersen" <morphex@gmail.com> - 2015-09-16 17:47 +0200
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-09-16 09:37 -0700
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) "Morten W. Petersen" <morphex@gmail.com> - 2015-09-17 15:41 +0200
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-09-17 07:06 -0700
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) "Morten W. Petersen" <morphex@gmail.com> - 2015-09-17 16:22 +0200
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) David Brown <david.brown@hesbynett.no> - 2015-09-16 23:13 +0200
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) "Morten W. Petersen" <morphex@gmail.com> - 2015-09-17 15:35 +0200
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) jacobnavia <jacob@jacob.remcomp.fr> - 2015-09-16 18:12 +0200
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Noob <root@127.0.0.1> - 2015-09-16 13:18 +0200
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Keith Thompson <kst-u@mib.org> - 2015-09-16 08:47 -0700
Re: Quoting Noob <root@127.0.0.1> - 2015-09-16 20:30 +0200
Re: Quoting Keith Thompson <kst-u@mib.org> - 2015-09-16 11:41 -0700
Re: Quoting Noob <root@127.0.0.1> - 2015-09-16 20:53 +0200
Re: Quoting Keith Thompson <kst-u@mib.org> - 2015-09-16 12:19 -0700
Re: Quoting Noob <root@127.0.0.1> - 2015-09-16 21:49 +0200
Re: Quoting Keith Thompson <kst-u@mib.org> - 2015-09-16 13:24 -0700
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) jacobnavia <jacob@jacob.remcomp.fr> - 2015-09-16 18:14 +0200
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) "Morten W. Petersen" <morphex@gmail.com> - 2015-09-16 18:22 +0200
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) jacobnavia <jacob@jacob.remcomp.fr> - 2015-09-16 18:29 +0200
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) "Morten W. Petersen" <morphex@gmail.com> - 2015-09-16 18:31 +0200
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) James Kuyper <jameskuyper@verizon.net> - 2015-09-16 12:48 -0400
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) "Morten W. Petersen" <morphex@gmail.com> - 2015-09-16 18:56 +0200
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) James Kuyper <jameskuyper@verizon.net> - 2015-09-16 13:09 -0400
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) "Morten W. Petersen" <morphex@gmail.com> - 2015-09-16 23:41 +0200
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) James Kuyper <jameskuyper@verizon.net> - 2015-09-16 18:05 -0400
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Martin Shobe <martin.shobe@yahoo.com> - 2015-09-16 12:13 -0500
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-09-16 10:13 -0700
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) fir <profesor.fir@gmail.com> - 2015-09-16 14:01 -0700
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-09-16 10:02 -0700
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) fir <profesor.fir@gmail.com> - 2015-09-16 13:53 -0700
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) fir <profesor.fir@gmail.com> - 2015-09-16 14:10 -0700
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Keith Thompson <kst-u@mib.org> - 2015-09-16 10:33 -0700
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) "Morten W. Petersen" <morphex@gmail.com> - 2015-09-16 19:40 +0200
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Martin Shobe <martin.shobe@yahoo.com> - 2015-09-16 12:50 -0500
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) "Morten W. Petersen" <morphex@gmail.com> - 2015-09-16 19:55 +0200
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) James Kuyper <jameskuyper@verizon.net> - 2015-09-16 13:57 -0400
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Keith Thompson <kst-u@mib.org> - 2015-09-16 11:02 -0700
Re: Hidden agendas on Usenet Noob <root@127.0.0.1> - 2015-09-16 20:50 +0200
Re: Hidden agendas on Usenet Keith Thompson <kst-u@mib.org> - 2015-09-16 12:20 -0700
Re: Hidden agendas on Usenet "Morten W. Petersen" <morphex@gmail.com> - 2015-09-16 23:33 +0200
Re: Hidden agendas on Usenet James Kuyper <jameskuyper@verizon.net> - 2015-09-16 17:52 -0400
Re: Hidden agendas on Usenet "Morten W. Petersen" <morphex@gmail.com> - 2015-09-17 00:03 +0200
Re: Hidden agendas on Usenet Keith Thompson <kst-u@mib.org> - 2015-09-16 15:21 -0700
Re: Hidden agendas on Usenet "Morten W. Petersen" <morphex@gmail.com> - 2015-09-17 00:30 +0200
Re: Hidden agendas on Usenet Richard Heathfield <rjh@cpax.org.uk> - 2015-09-17 00:26 +0100
Re: Hidden agendas on Usenet Geoff <geoff@invalid.invalid> - 2015-09-16 21:24 -0700
Re: Hidden agendas on Usenet Richard Heathfield <rjh@cpax.org.uk> - 2015-09-17 05:48 +0100
Re: Hidden agendas on Usenet Geoff <geoff@invalid.invalid> - 2015-09-17 07:16 -0700
Re: Hidden agendas on Usenet Richard Heathfield <rjh@cpax.org.uk> - 2015-09-17 17:00 +0100
Re: Hidden agendas on Usenet Keith Thompson <kst-u@mib.org> - 2015-09-17 11:23 -0700
MSVC deprecation (was Re: Hidden agendas on Usenet) Keith Thompson <kst-u@mib.org> - 2015-09-16 23:31 -0700
Re: MSVC deprecation (was Re: Hidden agendas on Usenet) Geoff <geoff@invalid.invalid> - 2015-09-17 07:33 -0700
Re: Hidden agendas on Usenet David Brown <david.brown@hesbynett.no> - 2015-09-17 11:46 +0200
Re: Hidden agendas on Usenet Ian Collins <ian-news@hotmail.com> - 2015-09-17 22:26 +1200
Re: Hidden agendas on Usenet gazelle@shell.xmission.com (Kenny McCormack) - 2015-09-17 11:17 +0000
Re: Hidden agendas on Usenet David Brown <david.brown@hesbynett.no> - 2015-09-17 13:33 +0200
Re: Hidden agendas on Usenet "Morten W. Petersen" <morphex@gmail.com> - 2015-09-17 13:56 +0200
Re: Hidden agendas on Usenet David Brown <david.brown@hesbynett.no> - 2015-09-17 14:20 +0200
Re: Hidden agendas on Usenet Bartc <bc@freeuk.com> - 2015-09-17 13:28 +0100
Re: Hidden agendas on Usenet David Brown <david.brown@hesbynett.no> - 2015-09-17 15:18 +0200
Re: Hidden agendas on Usenet gazelle@shell.xmission.com (Kenny McCormack) - 2015-09-17 13:34 +0000
Re: Hidden agendas on Usenet gazelle@shell.xmission.com (Kenny McCormack) - 2015-09-17 12:29 +0000
Re: Hidden agendas on Usenet Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-09-17 05:34 -0700
Re: Hidden agendas on Usenet "Morten W. Petersen" <morphex@gmail.com> - 2015-09-17 14:48 +0200
Re: Hidden agendas on Usenet James Kuyper <jameskuyper@verizon.net> - 2015-09-17 08:52 -0400
Re: Hidden agendas on Usenet James Kuyper <jameskuyper@verizon.net> - 2015-09-17 08:50 -0400
Re: Hidden agendas on Usenet gazelle@shell.xmission.com (Kenny McCormack) - 2015-09-17 12:57 +0000
Re: Hidden agendas on Usenet Richard Heathfield <rjh@cpax.org.uk> - 2015-09-17 13:52 +0100
Re: Hidden agendas on Usenet fir <profesor.fir@gmail.com> - 2015-09-17 07:13 -0700
Re: Hidden agendas on Usenet fir <profesor.fir@gmail.com> - 2015-09-17 07:42 -0700
Re: Hidden agendas on Usenet fir <profesor.fir@gmail.com> - 2015-09-17 07:55 -0700
Re: Hidden agendas on Usenet fir <profesor.fir@gmail.com> - 2015-09-18 05:51 -0700
Re: Hidden agendas on Usenet James Kuyper <jameskuyper@verizon.net> - 2015-09-16 16:27 -0400
Re: Hidden agendas on Usenet David Brown <david.brown@hesbynett.no> - 2015-09-16 23:35 +0200
Re: Hidden agendas on Usenet Richard Heathfield <rjh@cpax.org.uk> - 2015-09-17 00:36 +0100
Re: Hidden agendas on Usenet "Morten W. Petersen" <morphex@gmail.com> - 2015-09-17 08:09 +0200
Re: Hidden agendas on Usenet Richard Heathfield <rjh@cpax.org.uk> - 2015-09-17 07:59 +0100
Re: Hidden agendas on Usenet Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-09-17 01:13 -0700
Re: Hidden agendas on Usenet "Morten W. Petersen" <morphex@gmail.com> - 2015-09-17 13:08 +0200
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) David Brown <david.brown@hesbynett.no> - 2015-09-16 23:22 +0200
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Richard Damon <Richard@Damon-Family.org> - 2015-09-17 08:57 -0400
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) David Brown <david.brown@hesbynett.no> - 2015-09-17 15:28 +0200
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) James Kuyper <jameskuyper@verizon.net> - 2015-09-17 09:45 -0400
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Richard Damon <Richard@Damon-Family.org> - 2015-09-17 22:56 -0400
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) David Brown <david.brown@hesbynett.no> - 2015-09-18 10:19 +0200
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Robert Wessel <robertwessel2@yahoo.com> - 2015-09-17 23:01 -0500
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) David Brown <david.brown@hesbynett.no> - 2015-09-18 10:20 +0200
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Richard Heathfield <rjh@cpax.org.uk> - 2015-09-18 09:23 +0100
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) David Brown <david.brown@hesbynett.no> - 2015-09-18 14:08 +0200
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Keith Thompson <kst-u@mib.org> - 2015-09-18 08:48 -0700
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Lowell Gilbert <lgusenet@be-well.ilk.org> - 2015-09-18 16:44 -0400
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) James Kuyper <jameskuyper@verizon.net> - 2015-09-18 17:33 -0400
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Lowell Gilbert <lgusenet@be-well.ilk.org> - 2015-09-19 21:12 -0400
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) raltbos@xs4all.nl (Richard Bos) - 2015-09-21 09:10 +0000
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) gazelle@shell.xmission.com (Kenny McCormack) - 2015-09-21 09:16 +0000
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Keith Thompson <kst-u@mib.org> - 2015-09-16 08:34 -0700
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-09-16 09:33 -0700
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Keith Thompson <kst-u@mib.org> - 2015-09-16 10:43 -0700
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-09-16 12:29 -0700
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Keith Thompson <kst-u@mib.org> - 2015-09-16 13:10 -0700
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-09-16 13:42 -0700
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Keith Thompson <kst-u@mib.org> - 2015-09-16 14:04 -0700
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-09-16 14:34 -0700
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Keith Thompson <kst-u@mib.org> - 2015-09-16 15:01 -0700
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Richard Damon <Richard@Damon-Family.org> - 2015-09-16 22:26 -0400
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) jacobnavia <jacob@jacob.remcomp.fr> - 2015-09-17 13:46 +0200
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Richard Heathfield <rjh@cpax.org.uk> - 2015-09-17 12:48 +0100
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Philip Lantz <prl@canterey.us> - 2015-09-19 12:40 -0700
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) raltbos@xs4all.nl (Richard Bos) - 2015-09-21 09:14 +0000
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-09-21 06:13 -0700
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-09-21 17:39 +0100
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) raltbos@xs4all.nl (Richard Bos) - 2015-10-02 13:21 +0000
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Keith Thompson <kst-u@mib.org> - 2015-10-02 13:25 -0700
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) raltbos@xs4all.nl (Richard Bos) - 2015-10-04 13:51 +0000
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Keith Thompson <kst-u@mib.org> - 2015-10-04 15:45 -0700
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Geoff <geoff@invalid.invalid> - 2015-09-16 21:39 -0700
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Richard Heathfield <rjh@cpax.org.uk> - 2015-09-17 00:42 +0100
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Kelsey Bjarnason <kbjarnason@gmail.com> - 2015-09-24 07:34 -0700
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Robert Wessel <robertwessel2@yahoo.com> - 2015-09-16 23:55 -0500
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Robert Wessel <robertwessel2@yahoo.com> - 2015-09-16 13:03 -0500
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Ian Collins <ian-news@hotmail.com> - 2015-09-16 19:31 +1200
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Noob <root@127.0.0.1> - 2015-09-16 11:06 +0200
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Ian Collins <ian-news@hotmail.com> - 2015-09-16 21:17 +1200
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Noob <root@127.0.0.1> - 2015-09-16 11:56 +0200
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Keith Thompson <kst-u@mib.org> - 2015-09-16 08:59 -0700
Re: "gcc" on OS X Noob <root@127.0.0.1> - 2015-09-16 21:43 +0200
Re: "gcc" on OS X Keith Thompson <kst-u@mib.org> - 2015-09-16 13:20 -0700
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) Ian Collins <ian-news@hotmail.com> - 2015-09-17 08:25 +1200
Re: Compiling C project for Windows and Mac OS X (GCC for Linux) gazelle@shell.xmission.com (Kenny McCormack) - 2015-09-17 11:21 +0000
Re: gcc not a symlink on Mac OS X Noob <root@127.0.0.1> - 2015-09-17 17:06 +0200
Page 6 of 7 — ← Prev page 1 2 3 4 5 [6] 7 Next page →
| From | Lowell Gilbert <lgusenet@be-well.ilk.org> |
|---|---|
| Date | 2015-09-19 21:12 -0400 |
| Message-ID | <44d1xdevvy.fsf@lowell-desk.lan> |
| In reply to | #70909 |
James Kuyper <jameskuyper@verizon.net> writes: > On 09/18/2015 04:44 PM, Lowell Gilbert wrote: >> David Brown <david.brown@hesbynett.no> writes: >> >>> Spell chequers are great, but can't fix every mistake :-) >> >> That's "draughts." > > No, he's obviously referring to the fruit of the chequer tree, Sorbus > torminalis > <https://en.wikipedia.org/wiki/Sorbus_torminalis#Uses_and_etymology>. :-) Chequer? Why, I don't even know her!
[toc] | [prev] | [next] | [standalone]
| From | raltbos@xs4all.nl (Richard Bos) |
|---|---|
| Date | 2015-09-21 09:10 +0000 |
| Message-ID | <55ffc948.4231375@news.xs4all.nl> |
| In reply to | #70815 |
David Brown <david.brown@hesbynett.no> wrote: > On 17/09/15 14:57, Richard Damon wrote: > > Since there is a compiler option to turn off this warning, you CAN write > > fully C standard compliant code and use MSVC, you just need to set the > > appropriate compiler options (which the warning even describes how to do). > > It's a mute point anyway, since I would never use MSVC for C code. _Moot_ point. Wish it were mute! > > My experience is that out of the box, most compilers aren't fully > > standards conforming, but try to give you something in the eyes of the > > implementers is 'better', but most try to get at least close to standard > > conforming (maybe not the latest, but some version) with appropriate > > options. Very much including, noobs take notice!, GCC. Richard
[toc] | [prev] | [next] | [standalone]
| From | gazelle@shell.xmission.com (Kenny McCormack) |
|---|---|
| Date | 2015-09-21 09:16 +0000 |
| Message-ID | <mtohu5$nr9$1@news.xmission.com> |
| In reply to | #71009 |
In article <55ffc948.4231375@news.xs4all.nl>, Richard Bos <rlbos@xs4all.nl> wrote: ... >> > fully C standard compliant code and use MSVC, you just need to set the >> > appropriate compiler options (which the warning even describes how to do). >> >> It's a mute point anyway, since I would never use MSVC for C code. > >_Moot_ point. Wish it were mute! There's really nothing can be done about the post-literate generation. Alas... >> > My experience is that out of the box, most compilers aren't fully >> > standards conforming, but try to give you something in the eyes of the >> > implementers is 'better', but most try to get at least close to standard >> > conforming (maybe not the latest, but some version) with appropriate >> > options. > >Very much including, noobs take notice!, GCC. But see .sig... -- For instance, Standard C says that nearly all extensions to C are prohibited. How silly! GCC implements many extensions, some of which were later adopted as part of the standard. If you want these constructs to give an error message as “required” by the standard, you must specify ‘--pedantic’, which was implemented only so that we can say “GCC is a 100% implementation of the standard”, not because there is any reason to actually use it.
[toc] | [prev] | [next] | [standalone]
| From | Keith Thompson <kst-u@mib.org> |
|---|---|
| Date | 2015-09-16 08:34 -0700 |
| Message-ID | <ln37yel6od.fsf@kst-u.example.com> |
| In reply to | #70615 |
Malcolm McLean <malcolm.mclean5@btinternet.com> writes:
[...]
> You should also consider writing your own standard library string
> functions - Microsoft has deprecated them, but not the identical
> function with a my prefix.
If you want to write your own string functions that are in some way
better than the standard ones, that's fine (though you're likely
to reinvent a number of wheels).
But the standard functions are, well, *standard*. Even if Microsoft
"deprecates" them, they still support them, and they still work.
If you want to use them, just use them, and figure out how
to disable Microsoft's deprecation warnings. Writing your own
mystrcpy() function that does the same thing as strcpy(), just to
avoid a warning, is pointless, error-prone, and likely to have a
performance cost.
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Working, but not speaking, for JetHead Development, Inc.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
[toc] | [prev] | [next] | [standalone]
| From | Malcolm McLean <malcolm.mclean5@btinternet.com> |
|---|---|
| Date | 2015-09-16 09:33 -0700 |
| Message-ID | <77230d0e-fb57-4141-9aaa-db3efdda1ccb@googlegroups.com> |
| In reply to | #70638 |
On Wednesday, September 16, 2015 at 4:34:25 PM UTC+1, Keith Thompson wrote: > Malcolm McLean <malcolm.mclean5@btinternet.com> writes: > [...] > > You should also consider writing your own standard library string > > functions - Microsoft has deprecated them, but not the identical > > function with a my prefix. > > If you want to write your own string functions that are in some way > better than the standard ones, that's fine (though you're likely > to reinvent a number of wheels). > > But the standard functions are, well, *standard*. Even if Microsoft > "deprecates" them, they still support them, and they still work. > If you want to use them, just use them, and figure out how > to disable Microsoft's deprecation warnings. Writing your own > mystrcpy() function that does the same thing as strcpy(), just to > avoid a warning, is pointless, error-prone, and likely to have a > performance cost. > It doesn't take an experienced C programmer a minute to write strcpy. Your fingers just fly at the keyboard. It's probably a lot slower than the tweaked system version, but string handling isn't usually the bottleneck in most programs. It's not an ideal situation, but having code that won't compile with the default setting isn't ideal either.
[toc] | [prev] | [next] | [standalone]
| From | Keith Thompson <kst-u@mib.org> |
|---|---|
| Date | 2015-09-16 10:43 -0700 |
| Message-ID | <lnlhc6jm3s.fsf@kst-u.example.com> |
| In reply to | #70648 |
Malcolm McLean <malcolm.mclean5@btinternet.com> writes:
> On Wednesday, September 16, 2015 at 4:34:25 PM UTC+1, Keith Thompson wrote:
>> Malcolm McLean <malcolm.mclean5@btinternet.com> writes:
>> [...]
>> > You should also consider writing your own standard library string
>> > functions - Microsoft has deprecated them, but not the identical
>> > function with a my prefix.
>>
>> If you want to write your own string functions that are in some way
>> better than the standard ones, that's fine (though you're likely
>> to reinvent a number of wheels).
>>
>> But the standard functions are, well, *standard*. Even if Microsoft
>> "deprecates" them, they still support them, and they still work.
>> If you want to use them, just use them, and figure out how
>> to disable Microsoft's deprecation warnings. Writing your own
>> mystrcpy() function that does the same thing as strcpy(), just to
>> avoid a warning, is pointless, error-prone, and likely to have a
>> performance cost.
>>
> It doesn't take an experienced C programmer a minute to write
> strcpy. Your fingers just fly at the keyboard. It's probably a lot
> slower than the tweaked system version, but string handling isn't usually
> the bottleneck in most programs.
> It's not an ideal situation, but having code that won't compile with the
> default setting isn't ideal either.
Sure, if a call to strcpy() didn't compile, writing a replacement
(which is likely to be less efficient than the standard one) could
be a reasonable workaround. If I needed to write replacements for
multiple standard functions, the odds that I'd introduce a bug in
at least one of them are reasonably high.
Are you saying that a program containing a call to strcpy() actually
doesn't compile using Microsoft's compiler? If so, I believe you're
mistaken. My understanding is that it produces a warning by default,
and that the warning can be suppressed without too much trouble.
Microsoft's documentation for Visual Studio 2015 even includes a
sample program that calls strcpy():
https://msdn.microsoft.com/en-us/library/kk6xf663.aspx
A bit of Googling indicates that one way to avoid the warning is:
#ifdef _MSC_VER
#define _CRT_SECURE_NO_WARNINGS
#endif
There's also a "/GS-" option that can be set in your project
settings. But even without those workarounds, as far as I can tell
a program that uses strcpy() *will* compile successfully (but not
without warnings).
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Working, but not speaking, for JetHead Development, Inc.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
[toc] | [prev] | [next] | [standalone]
| From | Malcolm McLean <malcolm.mclean5@btinternet.com> |
|---|---|
| Date | 2015-09-16 12:29 -0700 |
| Message-ID | <dc8a1882-32f4-46bb-abd6-55ce770f0971@googlegroups.com> |
| In reply to | #70662 |
On Wednesday, September 16, 2015 at 6:44:00 PM UTC+1, Keith Thompson wrote: > Malcolm McLean <malcolm.mclean5@btinternet.com> writes: > > Are you saying that a program containing a call to strcpy() actually > doesn't compile using Microsoft's compiler? If so, I believe you're > mistaken. > I got a Microsoft compiler in front of me, and I can assure you that with the default settings, a call to strcpy() is treated as fatal. You can turn the behaviour of by defining _CRT_SECURE_NO_WARNINGS, but it's made slightly difficult, I'd guess deliberately. If a customer says "avoiding security exploits is important to me, I want that behaviour on" then of course code calling strcpy() is useless to him. You can write your equivalent mystrcpy(), which achieves nothing in terms of avoiding buffer overruns, but shuts up the warning.
[toc] | [prev] | [next] | [standalone]
| From | Keith Thompson <kst-u@mib.org> |
|---|---|
| Date | 2015-09-16 13:10 -0700 |
| Message-ID | <lnr3lyi0r7.fsf@kst-u.example.com> |
| In reply to | #70682 |
Malcolm McLean <malcolm.mclean5@btinternet.com> writes:
> On Wednesday, September 16, 2015 at 6:44:00 PM UTC+1, Keith Thompson wrote:
>> Are you saying that a program containing a call to strcpy() actually
>> doesn't compile using Microsoft's compiler? If so, I believe you're
>> mistaken.
>>
> I got a Microsoft compiler in front of me, and I can assure you that
> with the default settings, a call to strcpy() is treated as fatal.
> You can turn the behaviour of by defining _CRT_SECURE_NO_WARNINGS,
> but it's made slightly difficult, I'd guess deliberately.
That's surprising, and (I think) inconsistent with what I've read
elsewhere.
Are your "default settings" different from the original ones you get
when you install the system? If you've changed the configuration
of your installation, that could explain the apparent discrepancy.
I seem to recall that there's an option to make the deprecation
warnings fatal, but I don't recall that it's enabled by default.
If calling strcpy() were treated as a fatal error by default, I'd
expect Microsoft's own documentation to say so. (It would also
make Microsoft's C compiler blatantly non-conforming.)
> If a customer says "avoiding security exploits is important to me,
> I want that behaviour on" then of course code calling strcpy() is
> useless to him. You can write your equivalent mystrcpy(), which
> achieves nothing in terms of avoiding buffer overruns, but shuts
> up the warning.
If a customer won't accept code that calls strcpy(), they certainly
won't accept code that calls your clone of strcpy() (if they know
what they're doing). If they will accept such code, the sensible
way to achieve it is to define _CRT_SECURE_NO_WARNINGS, not to
waste time re-inventing wheels.
Seriously, I can think of no legitimate circumstances in which your
suggested approach makes sense. (I can think of some illegitimate
circumstances, but there's no need to go into that.)
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Working, but not speaking, for JetHead Development, Inc.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
[toc] | [prev] | [next] | [standalone]
| From | Malcolm McLean <malcolm.mclean5@btinternet.com> |
|---|---|
| Date | 2015-09-16 13:42 -0700 |
| Message-ID | <a291ffcb-9e8a-414e-93cb-6cbfcf3d9509@googlegroups.com> |
| In reply to | #70691 |
On Wednesday, September 16, 2015 at 9:10:35 PM UTC+1, Keith Thompson wrote: > Malcolm McLean <malcolm.mclean5@btinternet.com> writes: > > If a customer won't accept code that calls strcpy(), they certainly > won't accept code that calls your clone of strcpy() (if they know > what they're doing). If they will accept such code, the sensible > way to achieve it is to define _CRT_SECURE_NO_WARNINGS, not to > waste time re-inventing wheels. > It's re-making a wheel, not re-inventing one. To invent a wheel requires some genius. To put one of your own on the chariot rather than use the set that came from the chariot manufacturers just takes a bit of effort. The security features are turned on, so they have that safety.
[toc] | [prev] | [next] | [standalone]
| From | Keith Thompson <kst-u@mib.org> |
|---|---|
| Date | 2015-09-16 14:04 -0700 |
| Message-ID | <ln1tdyhy99.fsf@kst-u.example.com> |
| In reply to | #70704 |
Malcolm McLean <malcolm.mclean5@btinternet.com> writes:
> On Wednesday, September 16, 2015 at 9:10:35 PM UTC+1, Keith Thompson wrote:
>> If a customer won't accept code that calls strcpy(), they certainly
>> won't accept code that calls your clone of strcpy() (if they know
>> what they're doing). If they will accept such code, the sensible
>> way to achieve it is to define _CRT_SECURE_NO_WARNINGS, not to
>> waste time re-inventing wheels.
>>
> It's re-making a wheel, not re-inventing one. To invent a wheel
> requires some genius. To put one of your own on the chariot
> rather than use the set that came from the chariot manufacturers
> just takes a bit of effort.
> The security features are turned on, so they have that safety.
Sorry, I don't understand the point you're making.
The phrase "re-inventing wheels" wasn't intended to imply that
there's any real invention going on, merely that it's a waste of
time and effort.
You seem to be advocating (a) leaving Microsoft's compiler
configured so that it rejects calls to the standard strcmp()
function, presumably for security reasons, and then (b) writing own
equivalent, and equally insecure, mystrcmp() function and using it
instead of strcmp().
Is that really what you're advocating? If so, it simply makes no
sense to me. Am I missing something?
And I'm still curious about the default settings. My understanding
is that Microsoft's C compiler merely *warns* about strcmp() in its
default mode. You seem to be saying that it instead treats it as
a fatal error. Is that really the case?
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Working, but not speaking, for JetHead Development, Inc.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
[toc] | [prev] | [next] | [standalone]
| From | Malcolm McLean <malcolm.mclean5@btinternet.com> |
|---|---|
| Date | 2015-09-16 14:34 -0700 |
| Message-ID | <8c22fa39-8e38-4c63-804a-b99b198bb1b3@googlegroups.com> |
| In reply to | #70713 |
On Wednesday, September 16, 2015 at 10:04:25 PM UTC+1, Keith Thompson wrote: > Malcolm McLean <malcolm.mclean5@btinternet.com> writes: > > On Wednesday, September 16, 2015 at 9:10:35 PM UTC+1, Keith Thompson wrote: > >> If a customer won't accept code that calls strcpy(), they certainly > >> won't accept code that calls your clone of strcpy() (if they know > >> what they're doing). If they will accept such code, the sensible > >> way to achieve it is to define _CRT_SECURE_NO_WARNINGS, not to > >> waste time re-inventing wheels. > >> > > It's re-making a wheel, not re-inventing one. To invent a wheel > > requires some genius. To put one of your own on the chariot > > rather than use the set that came from the chariot manufacturers > > just takes a bit of effort. > > The security features are turned on, so they have that safety. > > Sorry, I don't understand the point you're making. > > The phrase "re-inventing wheels" wasn't intended to imply that > there's any real invention going on, merely that it's a waste of > time and effort. > > You seem to be advocating (a) leaving Microsoft's compiler > configured so that it rejects calls to the standard strcmp() > function, presumably for security reasons, and then (b) writing own > equivalent, and equally insecure, mystrcmp() function and using it > instead of strcmp(). > > Is that really what you're advocating? If so, it simply makes no > sense to me. Am I missing something? > > And I'm still curious about the default settings. My understanding > is that Microsoft's C compiler merely *warns* about strcmp() in its > default mode. You seem to be saying that it instead treats it as > a fatal error. Is that really the case? > Yes, I put an X before _CRT_SECURE_NO_WARNINGS to turn the defult behaviour back on whilst conserving keystrokes, and I get the following Severity Code Description Project File Line Error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. SeamlessTextureMaker c:\users\malcolm\documents\visual studio 2015\projects\seamlesstexturemaker\options.c 345 No executable produced. If I replace strcpy with mystrcpy, the problem goes away. Try writing mystrcpy. Set the clock running. How long did that take?
[toc] | [prev] | [next] | [standalone]
| From | Keith Thompson <kst-u@mib.org> |
|---|---|
| Date | 2015-09-16 15:01 -0700 |
| Message-ID | <lnsi6egh15.fsf@kst-u.example.com> |
| In reply to | #70723 |
Malcolm McLean <malcolm.mclean5@btinternet.com> writes:
> On Wednesday, September 16, 2015 at 10:04:25 PM UTC+1, Keith Thompson wrote:
[...]
>> And I'm still curious about the default settings. My understanding
>> is that Microsoft's C compiler merely *warns* about strcmp() in its
>> default mode. You seem to be saying that it instead treats it as
>> a fatal error. Is that really the case?
>>
>
> Yes, I put an X before _CRT_SECURE_NO_WARNINGS to turn the defult
> behaviour back on whilst conserving keystrokes, and I get the
> following
>
> Severity Code Description Project File Line
> Error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. SeamlessTextureMaker c:\users\malcolm\documents\visual studio 2015\projects\seamlesstexturemaker\options.c 345
>
>
> No executable produced.
> If I replace strcpy with mystrcpy, the problem goes away.
>
> Try writing mystrcpy. Set the clock running. How long did that take?
No time at all, because I'm not going to waste my time re-writing
standard library functions. (Yes, I'm sure I could do it.)
Try changing your compiler's settings. How long did *that* take?
But I'd like to ask others here to confirm your observations.
Other uses of Microsoft Visual Studio: If you compile a simple
program that calls strcpy() with default settings, does it really
treat it as a fatal error?
My suspicion, Malcolm, is that you've modified the settings in
Visual Studio to perform stricter checking than the out-of-the-box
default, and that the actual default behavior is to issue a warning,
not a fatal error.
And again, if you want the functionality of strcpy(), the sensible
way to get it is to disable the deprecation check (which apparently
is quite easy to do), not to write your own version. If you're
unwilling to disable the deprecation check for security reasons,
then you should be unwilling to use mystrcpy(), which at best is
no safer than strcpy().
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Working, but not speaking, for JetHead Development, Inc.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
[toc] | [prev] | [next] | [standalone]
| From | Richard Damon <Richard@Damon-Family.org> |
|---|---|
| Date | 2015-09-16 22:26 -0400 |
| Message-ID | <uxpKx.143190$zz6.1434@fx04.iad> |
| In reply to | #70733 |
On 9/16/15 6:01 PM, Keith Thompson wrote: > My suspicion, Malcolm, is that you've modified the settings in > Visual Studio to perform stricter checking than the out-of-the-box > default, and that the actual default behavior is to issue a warning, > not a fatal error. > I believe Microsoft themselves changed the default recently to turn this on as a fatal error. This just says that VS isn't a conforming compiler out of the box, but needs selected options to make it conforming. That isn't that unusual. I believe gcc needs some options applied to make it conforming too (as I remember, by default it doesn't give a diagnostic for some things that are required to have a diagnostic).
[toc] | [prev] | [next] | [standalone]
| From | jacobnavia <jacob@jacob.remcomp.fr> |
|---|---|
| Date | 2015-09-17 13:46 +0200 |
| Message-ID | <mte932$7o4$1@dont-email.me> |
| In reply to | #70765 |
Le 17/09/2015 04:26, Richard Damon a écrit : > This just says that VS isn't a conforming compiler out of the box YES! Use lcc-win instead :-)
[toc] | [prev] | [next] | [standalone]
| From | Richard Heathfield <rjh@cpax.org.uk> |
|---|---|
| Date | 2015-09-17 12:48 +0100 |
| Message-ID | <qMxKx.511944$8E7.143588@fx29.am4> |
| In reply to | #70796 |
On 17/09/2015 12:46, jacobnavia wrote: > Le 17/09/2015 04:26, Richard Damon a écrit : >> This just says that VS isn't a conforming compiler out of the box > > > YES! > > Use lcc-win instead :-) Ha, I knew it - you don't work for Microsoft, you work for that lcc-win guy! Come on now, admit it! -- Richard Heathfield Email: rjh at cpax dot org dot uk "Usenet is a strange place" - dmr 29 July 1999 Sig line 4 vacant - apply within
[toc] | [prev] | [next] | [standalone]
| From | Philip Lantz <prl@canterey.us> |
|---|---|
| Date | 2015-09-19 12:40 -0700 |
| Message-ID | <MPG.306759f1eae8621b61@news.eternal-september.org> |
| In reply to | #70797 |
Richard Heathfield wrote: > jacobnavia wrote: > > Richard Damon a écrit : > >> This just says that VS isn't a conforming compiler out of the box > > > > YES! > > > > Use lcc-win instead :-) > > Ha, I knew it - you don't work for Microsoft, you work for that lcc-win > guy! Come on now, admit it! <smile>
[toc] | [prev] | [next] | [standalone]
| From | raltbos@xs4all.nl (Richard Bos) |
|---|---|
| Date | 2015-09-21 09:14 +0000 |
| Message-ID | <55ffca40.4479046@news.xs4all.nl> |
| In reply to | #70796 |
jacobnavia <jacob@jacob.remcomp.fr> wrote: > Le 17/09/2015 04:26, Richard Damon a écrit : > > This just says that VS isn't a conforming compiler out of the box > > YES! > > Use lcc-win instead :-) Is it _fully_ conforming out-of-the-box? Including having no extensions turned on? Richard
[toc] | [prev] | [next] | [standalone]
| From | Malcolm McLean <malcolm.mclean5@btinternet.com> |
|---|---|
| Date | 2015-09-21 06:13 -0700 |
| Message-ID | <133bd5bf-5eb3-4161-997b-65407fd255b1@googlegroups.com> |
| In reply to | #71010 |
On Monday, September 21, 2015 at 10:14:32 AM UTC+1, Richard Bos wrote: > jacobnavia <jacob@jacob.remcomp.fr> wrote: > > > > > Use lcc-win instead :-) > > Is it _fully_ conforming out-of-the-box? > > Including having no extensions turned on? > lcc-win is essentially conforming in default mode. However some of the extensions might break carefully contrived by valid C programs - there's no easy way round that, as the supposed mechanisms for extension are too cumbersome to give to an application-level programmer.
[toc] | [prev] | [next] | [standalone]
| From | Ben Bacarisse <ben.usenet@bsb.me.uk> |
|---|---|
| Date | 2015-09-21 17:39 +0100 |
| Message-ID | <87io73afrk.fsf@bsb.me.uk> |
| In reply to | #71013 |
Malcolm McLean <malcolm.mclean5@btinternet.com> writes: > On Monday, September 21, 2015 at 10:14:32 AM UTC+1, Richard Bos wrote: >> jacobnavia <jacob@jacob.remcomp.fr> wrote: >> >> > >> > Use lcc-win instead :-) >> >> Is it _fully_ conforming out-of-the-box? >> >> Including having no extensions turned on? >> > lcc-win is essentially conforming in default mode. What do you mean by essentially conforming? It silently allows extensions by default (as does gcc in case anyone thinks I'm attaching Jacob here) and that makes it non-conforming. The version I have (3.8) is non-conforming in other ways (even with the -ansic option) because I think there are still a few parsing bugs. I don't know the status of the latest version. > However some > of the extensions might break carefully contrived by valid > C programs - there's no easy way round that, as the supposed > mechanisms for extension are too cumbersome to give to > an application-level programmer. Is "supposed" a typo? As it is, I can't work out what it is that is too cumbersome for an application-level programmer. -- Ben.
[toc] | [prev] | [next] | [standalone]
| From | raltbos@xs4all.nl (Richard Bos) |
|---|---|
| Date | 2015-10-02 13:21 +0000 |
| Message-ID | <560e84a7.15783703@news.xs4all.nl> |
| In reply to | #71013 |
Malcolm McLean <malcolm.mclean5@btinternet.com> wrote: > On Monday, September 21, 2015 at 10:14:32 AM UTC+1, Richard Bos wrote: > > jacobnavia <jacob@jacob.remcomp.fr> wrote: > > > > > Use lcc-win instead :-) > > > > Is it _fully_ conforming out-of-the-box? > > > > Including having no extensions turned on? > > > lcc-win is essentially conforming in default mode. However some > of the extensions might break carefully contrived by valid > C programs - there's no easy way round that, as the supposed > mechanisms for extension are too cumbersome to give to > an application-level programmer. Then it's not a realistic alternative to VS in this regard, now is it? (How about Pelles C? I haven't checked whether it is conforming as first installed... but it's at least a good alternative.) Richard
[toc] | [prev] | [next] | [standalone]
Page 6 of 7 — ← Prev page 1 2 3 4 5 [6] 7 Next page →
Back to top | Article view | comp.lang.c
csiph-web