You cannot post messages because this group is only available as an archive.
|
Poorly terminated header files.
|
| |
After reading reams on token concatenation (and the portability of lack thereof of various means of doing it), the semantics of #define, ...to add yet another phenom to the fray, but here goes: Recently, through no fault of my own (honest, guv'nor!) I wound up including a header file with no terminating newline. The setup looked... more »
|
|
Bug converting unsigned to double in BSD 4.[23]
|
| |
I recently had occasion to perform this experiment: % cat bug.c main () { printf ("%u\n", ~ ((unsigned) 0)); printf ("%lf\n", (double) (~ ((unsigned) 0))); printf ("%lf\n", 4294967295.0); /* surely double is large enough for this? */ ...% bug 4294967295 -1.000000 4294967295.000000 The results were the same on BSD 4.2 and BSD 4.3. Of course, the question... more »
|
|
net.lang.c is being renamed comp.lang.c
|
| |
This newsgroup is being renamed from net.lang.c to comp.lang.c. This renaming will gradually take place over the next few weeks. More and more messages posted to this newsgroup will be aliased into the new newsgroup as they pass through the net, and people will begin to post to the new group. After a few weeks, the... more »
|
|
Order of evaluation and optimizing code
|
| |
I've read a number of letters in this column recently from people who would like to see C obey a strict left-to-right, inside-to-outside order of evaluation. I wonder if they realize how much this sort of thing cripples compilers in trying to optimize code. C is one of the best, if not *the* best languages in terms of compiled-code efficiency, and much of this is... more »
|
|
Not only that, but...
|
| |
In article <630@dg_rtp.UUCP>, throopw@dg_rtp.UUCP (Wayne Throop) types: ...Not only that, but: don't even *USE* an assigned-to object anywhere else in the expression! An example, given by K&R on p. 50: a[i] = i++; What is the value of i in the subscript? Who knows? Keep in mind this quote from the same page: "When side effects (assignment to actual variables) takes... more »
|
|
How to do it ?
|
| |
I would like to know if someone has used (or heard about the use of) high level languages (C, Pascal, Ada, ..) or tools to generate PDP-11 code. I think there could be various ways to do it, including : - a cross-compiler running on VAX/VMS or PDP/RSX which generates PDP-11 code - a pre-processor (like Whitesmith C) which generates MACRO-11 sources to be... more »
|
|
C-Compiler Validation Suites
|
| |
I am in search of C-Compiler-Validation-Suites and was wondering if anyone on the net could eventually pinpoint places where to get such beasts, how much they cost and if you have used them, what was your impression about the quality. Yes, I also know that on UNIX systems one considers a successful... more »
|
|
Length of external names
|
| |
A couple of months back, I was involved in a fairly active tirade about the length of external names in the C standard. I believed then, and still do, the the proposed standard's length of 8 characters in inadequate. This minimum will become a maximum for anyone wanting to write portable code. Now, I don't want to reopen the argument here. I am very curious,... more »
|
|
Phooey on Portability
|
| |
I'd like to get at the byte stored in memory location 6. So I just struct { char byte; int word; long longword; ...main(){char mybyte = 6->byte;} No sweat. Works like a charm daily. But what do I do on segmented memory systems like the PC? main(){char mybyte = 0:6->byte;} Not likely. So much of the squirming about lvalues and chars and the like... more »
|
|
Finding MSB in bit string
|
| |
Hopefully this won't get ignored after my last admittedly dumb posting (re: conversion in printf; thanks for the *civil* replies). I want to find the MSB in a bit string without having to do a series of shifts. Only the single bit in place needs to be isolated, to be used for example in a powers-of-2 switch. Finding the LSB in this way is no problem:... more »
|
|
|