is order urgent doubt

A

Antoninus Twink

And any kind of nonsense you can think about?

long signed long int,
signed long int long,
signed long signed long,
signed int long signed long int
long int long int
long int int long

Don't look now, but I wouldn't be surprised if Tomas
OEh_weird_non_ASCII_characters_ilde uses at least one of these as a
completely normal piece of syntax that he thinks no one should bat an
eyelid at.
 
J

jacob navia

Antoninus said:
I believe Keith's news provider is under a UDP for flooding Usenet with
SPAM, so your news server may not be carrying his messages. Whether
that's a bad thing or not is for you to decide...

(I think he switched to aioe for a while, but gave up when they went
down for a couple of days - they're back now.)

Strange. I see some messages from Keith in other threads but not in
this one... Go figure
 
K

Keith Thompson

jacob navia said:
Flash Gordon wrote: [...]
Those warnings made it clearer in my opinion, but I agree with
Keith's comments.

??? I do not see any message from Keith in this thread.
Could you clarify?

This is my fifth article in this thread.

Apparently my postings aren't getting through to your server. I know
there was a UDP against rr.com. After aioe.org went away temporarily,
I tried posting from rr.com again, and I was getting responses here,
so I assumed the UDP had been lifted. Apparently it was only
partially lifted.

I'll consider going back to posting through aioe.org. In the meantime,
my postings are appearing on groups.google.com. This thread is at

http://groups.google.com/group/comp.lang.c/browse_frm/thread/bb79fcbc32e45a5d/459429dfa58200bf

In the meantime, will somebody (not using rr.com) please post a
followup quoting this entire article?
 
F

Flash Gordon

Keith Thompson wrote, On 03/06/08 07:59:
jacob navia said:
new to c wrote: [...]
I use wedit IDE.
I write this code :
#include <stdio.h>
int main(void)
{
int i;
i = sizeof(long int);
printf("sizeof(long int): %d\n", i);
i = sizeof(int long);
printf("sizeof(int long): %d\n", i);
i = sizeof(double int);
printf("sizeof(double int): %d\n", i);
i = sizeof(int double);
printf("sizeof(int double): %d\n", i);
i = sizeof(long long int);
printf("sizeof(long long int): %d\n", i);
i = sizeof(long int long);
printf("sizeof(long int long): %d\n", i);
i = sizeof(int long long);
printf("sizeof(int long long): %d\n", i);
return 0;
}
Compiler warn
Warning c:\New_Folder\Test.c: 3 old-style definition for 'main'
Warning c:\New_Folder\Test.c: 3 missing prototype for 'main'
Warning c:\New_Folder\Test.c: 12 multiple use of 'int'
Warning c:\New_Folder\Test.c: 15 multiple use of 'double'
Warning c:\New_Folder\Test.c: 21 multiple use of 'long'
Warning c:\New_Folder\Test.c: 24 multiple use of 'longlong'
Compilation + link time 24.2 sec, Return code: 0
Code print
sizeof(long int): 4
sizeof(int long): 4
sizeof(double int): 4
sizeof(int double): 8
sizeof(long long int): 8
sizeof(long int long): 4
sizeof(int long long): 8
I am the author of lcc-win. I have changed the warning messages to a
clearer one. Now your program produces the following warnings:
Warning td.c: 12 multiple types in a declaration. Last will be used: 'int'
Warning td.c: 15 multiple types in a declaration. Last will be used:
'double'
Warning td.c: 21 multiple types in a declaration. Last will be used: 'long'
Warning td.c: 24 multiple types in a declaration. Last will be used:
'longlong'

Maybe this will clarify what lcc-win is doing.

lcc-win appears to meet the standard's requirement of issuing at
least one diagnostic for any translation unit containing a constraint
violation or syntax error.

Some questions, though:

1. Why not make "double int" and "int double" fatal errors?
IMHO you're not doing the user any favors by accepting these
and arbitrarily guessing what was meant.

2. Why do you warn about "long int long" and "int long long", both
of which are perfectly legal? I consider them both poor style,
but that's not what the warnings say.

3. Why does one of your warnings refer to "longlong" (presumably
something internal to the compiler)?

4. Do you still treat "long int long" as "long"? If so, that's
just a bug; "long int long" is equivalent to "long long".

Jacob, I've quoted Keith's message in its entirety for you as you could
not see it. As I say, I agree with his comments although strangely
enough I managed to miss his last one when reading first time or I would
not have made the same point!
 
J

jameskuyper

jacob navia said:
Flash Gordon wrote: [...]
Those warnings made it clearer in my opinion, but I agree with
Keith's comments.
??? I do not see any message from Keith in this thread.
Could you clarify?

This is my fifth article in this thread.

Apparently my postings aren't getting through to your server. I know
there was a UDP against rr.com. After aioe.org went away temporarily,
I tried posting from rr.com again, and I was getting responses here,
so I assumed the UDP had been lifted. Apparently it was only
partially lifted.

I'll consider going back to posting through aioe.org. In the meantime,
my postings are appearing on groups.google.com. This thread is at

http://groups.google.com/group/comp.lang.c/browse_frm/thread/bb79fcbc...

In the meantime, will somebody (not using rr.com) please post a
followup quoting this entire article?

--
Keith Thompson (The_Other_Keith) (e-mail address removed) <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"

Glad to be of service.
 
F

Flash Gordon

jacob navia wrote, On 03/06/08 21:24:
And why is not long int, then long?

"long int" *is* "long", just as "unsigned char" and "char unsigned" are
the same.
What about

int int int m;

The standard does not list any options with multiple int type specifiers.

Also note that is specifies that "long" is a type specifier but does
*not* list "long long" as a type specifier, so "long long" is two "long"
type specifiers.
And any kind of nonsense you can think about?

long signed long int,
Yes.

signed long int long,
Yes.

signed long signed long,

No because you have "signed" twice and that is not listed as allowed.
signed int long signed long int
long int long int
long int int long

ad nauseum?

Not anything, only "long" is allowed to appear twice. However you can
also have:
int long const long volatile unsigned
I just use the last one parsed.

Well, that is a bug then. I'm surprised you did not raise this not long
back when there was another long discussion about "unsigned long" verses
"long unsigned".
 
H

Harald van Dijk

And why is not long int, then long?

Because type specifiers are interpreted as a group, not individually.
What about

int int int m;

No, not that. "In any order" means just that: you can shuffle all you
want, but you can't add or remove keywords.
And any kind of nonsense you can think about?

long signed long int,
signed long int long,

Both are valid, and mean signed long long int, as signed and int each
appear once, and long appears twice.
signed long signed long,
signed int long signed long int
long int long int
long int int long

All of these are invalid. Neither signed nor int may occur more than once
in a series of type specifiers.
 
B

Bartc

jacob navia said:
And why is not long int, then long?

What about

int int int m;

And any kind of nonsense you can think about?

long signed long int,
signed long int long,
signed long signed long,
signed int long signed long int
long int long int
long int int long

ad nauseum?

I just use the last one parsed.

It seems you are allowed to have any of the possibilities in the list, and
to vary the order of the terms.

You probably /can't/ make up your own combinations. You can't have two ints
for example.

I've had a look at what's involved to parse and check these type specifiers,
and came up with the following ungainly code which uses random logic to
check the combinations. It seems the C language is at fault for allowing
type specifiers to be so untidy.

In this code, I've only bothered with type specifiers involving 'int' and
'double', and ignored complex and typedefs.


/* play with checking C type specifiers; input is from array input[] */
#include <stdio.h>
#include <stdlib.h>

#define kshort 1
#define klong 2
#define ksigned 3
#define kunsigned 4
#define kint 5
#define kchar 6
#define kfloat 7
#define kdouble 8
#define kvoid 9

int counts[kvoid+1]={0}; /* how many of each of the above is present */

void badtype(char *m) {
printf("Illegal type combination: %s\n",m);
exit(0);
}

void check(int t,int a,int b){
if (counts[t]<a || counts[t]>b) badtype("Too few or too many");
}

void checkz(int a,int b,int c,int d) { /* 1 to 4 params; unused param is 0
*/
if (counts[a]) badtype("Not allowed");
if (counts) badtype("Not allowed");
if (counts[c]) badtype("Not allowed");
if (counts[d]) badtype("Not allowed");
}

int main(void) {

//int input[]={kshort, kshort, kint, 0};
//int input[]={kint, kshort, kshort, kint, 0};
//int input[]={kint, kshort, klong, 0};
//int input[]={ksigned, kint, klong, klong, 0};
//int input[]={klong, kint, klong, 0};
int input[]={kunsigned, klong, klong, kint, 0};
//int input[]={kdouble, klong, 0};

int i,t;

/* Scan input (highly stylised form, this is not a compiler) and count each
kind of term */

i=0;
while (1) {
t=input[i++];
if (t==0) break;
++counts[t];

};

puts("Counts=");
for (i=kshort; i<=kvoid; ++i)
printf(" %d",counts);
puts("");

/* Try and figure out, not the actual type, but whether this is legal or not
*/

if (counts[kint]) { /* Contains an int */

check(kint,1,1); /* One int only */

checkz(kchar,kfloat,kdouble,kvoid); /* No other types */
if (counts[kshort]) { /* Short (1 or 2), excludes long? */

check(kshort,1,2);
check(klong,0,0);
}
else if (counts[klong]) {
check(kshort,0,0);
check(klong,1,2);
}

if (counts[ksigned]) { /* Signed excludes unsigned */
check(ksigned,1,1);
check(kunsigned,0,0);
};
if (counts[kunsigned]) {
check(ksigned,0,0);
check(kunsigned,1,1);
};

}
else if (counts[kchar]) {

}
else if (counts[kvoid]) {

}
else if (counts[kfloat]) {

}
else if (counts[kdouble]) {

check(kdouble,1,1);
checkz(kchar,kfloat,kint,kvoid);
checkz(kshort,ksigned,kunsigned,0);
check(klong,0,1);

}
else if (counts[kshort]) {

}
else if (counts[klong]) {

}
else if (counts[ksigned]) {

}
else if (counts[kunsigned]) {

}
else { /* empty type or contains elements not considered here */

badtype("Unknown");

};

puts("The type seems to be legal:");

/* Try and display it in normalised form: */

if (counts[ksigned]) printf("signed ");
if (counts[kunsigned]) printf("unsigned ");
if (counts[klong]==1) printf("long ");
if (counts[klong]==2) printf("long long ");
if (counts[kshort]==1) printf("short ");
if (counts[kshort]==2) printf("short short ");
if (counts[kvoid]) printf("void ");
if (counts[kint]) printf("int ");
if (counts[kchar]) printf("char ");
if (counts[kfloat]) printf("float ");
if (counts[kdouble]) printf("double ");
puts("");
}
 
F

Flash Gordon

Keith Thompson wrote, On 03/06/08 22:09:

Apparently my postings aren't getting through to your server. I know
there was a UDP against rr.com. After aioe.org went away temporarily,
I tried posting from rr.com again, and I was getting responses here,
so I assumed the UDP had been lifted. Apparently it was only
partially lifted.

Keith, if you want I can give you an account on my news server which
hooks up to enough free servers to keep me running. Email me and I'll
give you details.
 
K

Keith Thompson

Warning: the following is entirely off-topic.

There appear to have been some problems with my posts getting through.
My provider, rr.com, was under a UDP for some time; I was under the
impression that it had been lifted, but it may sill be partially in
place. jacob navia reports that he's seeing my posts to this
newsgroup, but didn't see anything from me in this thread. Nobody
else has complained (but then I wouldn't expect anyone to complain
about not seeing my messages). (Cue lame attempted sarcasm from the
trolls.)

The following are message-ids of articles I've posted to this thread,
all through rr.com:

<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>

I have two requests, which everyone is of course free to ignore.

1. Somebody please post a followup quoting this entire article.

2. Anyone who is so inclined, if your newsreader lets you access
articles by message-id, please see if the above listed articles are on
your server, and let me know *by e-mail* either way. I'm particularly
interested in hearing from jacob, since he's the one who didn't see
the messages when I posted them. (jacob posts through aioe.org, which
happens to be the server I'm considering switching back to if rr.com
is unsuitable.)

Thank you for your time.
 
S

santosh

Keith said:
Warning: the following is entirely off-topic.

There appear to have been some problems with my posts getting through.
My provider, rr.com, was under a UDP for some time; I was under the
impression that it had been lifted, but it may sill be partially in
place. jacob navia reports that he's seeing my posts to this
newsgroup, but didn't see anything from me in this thread. Nobody
else has complained (but then I wouldn't expect anyone to complain
about not seeing my messages). (Cue lame attempted sarcasm from the
trolls.)

The following are message-ids of articles I've posted to this thread,
all through rr.com:

<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>

I have two requests, which everyone is of course free to ignore.

1. Somebody please post a followup quoting this entire article.

2. Anyone who is so inclined, if your newsreader lets you access
articles by message-id, please see if the above listed articles are on
your server, and let me know *by e-mail* either way. I'm particularly
interested in hearing from jacob, since he's the one who didn't see
the messages when I posted them. (jacob posts through aioe.org, which
happens to be the server I'm considering switching back to if rr.com
is unsuitable.)

Thank you for your time.

There you go.

I'll tackle 2 later, but I strongly suspect that I have read all your
articles since you switched to rr.com. I'm using the server at
motzarella.org. Maybe aioe.org still has their block on rr.com in
place. You should probably post to a group under the news.admin
hierarchy, where you might get a direct response from the people who
control aioe.org and other servers.
 
K

Keith Thompson

santosh said:
Keith Thompson wrote: [...]
I'll tackle 2 later, but I strongly suspect that I have read all your
articles since you switched to rr.com. I'm using the server at
motzarella.org. Maybe aioe.org still has their block on rr.com in
place. You should probably post to a group under the news.admin
hierarchy, where you might get a direct response from the people who
control aioe.org and other servers.

I just checked aioe.org. They have 2483 articles in comp.lang.c, of
which only 2 are from me, both dated May 11, which seems to be as far
back as they go.
 
R

Ron Ford

[Article quote, by request. No extra content except this intro and the sig
block. Please ignore.]

Keith Thompson said:
Warning: the following is entirely off-topic.

There appear to have been some problems with my posts getting through.
My provider, rr.com, was under a UDP for some time; I was under the
impression that it had been lifted, but it may sill be partially in
place. jacob navia reports that he's seeing my posts to this
newsgroup, but didn't see anything from me in this thread. Nobody
else has complained (but then I wouldn't expect anyone to complain
about not seeing my messages). (Cue lame attempted sarcasm from the
trolls.)

The following are message-ids of articles I've posted to this thread,
all through rr.com:

<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>

I have two requests, which everyone is of course free to ignore.

1. Somebody please post a followup quoting this entire article.

2. Anyone who is so inclined, if your newsreader lets you access
articles by message-id, please see if the above listed articles are on
your server, and let me know *by e-mail* either way. I'm particularly
interested in hearing from jacob, since he's the one who didn't see
the messages when I posted them. (jacob posts through aioe.org, which
happens to be the server I'm considering switching back to if rr.com
is unsuitable.)

Thank you for your time.

I remember a time when Keith and the MI5 persecution dude were the only
persons whom I could not find on the net.

Then, using the same techniques, I couldn't find myself. A bit of an
existential crisis.

I assumed he had a poor NSP.
 
K

Keith Thompson

On Tue, 03 Jun 2008 16:23:07 -0700, Keith Thompson

I've seen lots of articles by you including the below.

Thank you.

Again, please reply *by e-mail*; there's no need for everyone to have
to read the responses.

(I don't have much information, but so far my hunch is that it's an
issue between rr.com and aioe.org.)
 
A

Antoninus Twink

English is not queasy about adopting words and phrases from other
languages. Ad nauseum so qualifies.

Glad to see it's not just C programming questions where CBF always gets
the wrong end of the stick and ends up embarrassing himself.

The point of the joke is that Jacob (and then CBF) mis-spelt nauseam -
it's actually a first declension noun.
 
A

Antoninus Twink

There appear to have been some problems with my posts getting through.
My provider, rr.com, was under a UDP for some time; I was under the
impression that it had been lifted, but it may sill be partially in
place.

I've seen plenty of posts by you over the past few weeks. Maybe the UDP
is still being observed by a few news servers, including aioe. You could
try asking on one of the aioe.* groups - maybe aioe.news.helpdesk or
aioe.news.assistenza.
 
R

Richard Bos

CBFalconer said:
English is not queasy about adopting words and phrases from other
languages. Ad nauseum so qualifies.

I know the English have a habit of perverting any phrases they steal
from other languages, but I was not yet aware that they'd done this with
ad nauseam.

Richard
 
J

jacob navia

Flash said:
"long int" *is* "long", just as "unsigned char" and "char unsigned" are
the same.


Following your logic we should accept

signed long int double | int long signed double

as equivalent to

long double

since "signed long int" or "int long signed" *is* a long
 
K

Keith Thompson

Keith Thompson said:
Warning: the following is entirely off-topic.

There appear to have been some problems with my posts getting through.
My provider, rr.com, was under a UDP for some time; I was under the
impression that it had been lifted, but it may sill be partially in
place. jacob navia reports that he's seeing my posts to this
newsgroup, but didn't see anything from me in this thread.
[...]

It turns out that aioe.org had placed a ban on rr.com. I posted to
aioe.news.helpdesk, and the ban has now been lifted.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,434
Messages
2,571,688
Members
48,796
Latest member
Greg L.

Latest Threads

Top