static allocation question...

G

goose

Pushkar Pradhan said:
Did you try this?
In C you have to declare all variables first and then start your code.
So you would have to do
int a;
int i;

What you did is allowed in c++. I mean this code:

Won't compile.

yes it will (or rather, "why do *you* think it wont?" ).

there isn't anything wrong in that code.

goose,
why dont you try it and see ?
 
E

Emmanuel Delahaye

You *must* use a valid from address as per the rules of your news service
provider.
You could lose your account.

1 - Mind your own business
2 - My news provider has my address. I connect via a a login and password.
 
M

Micah Cowan


Still not minding your own business. It is clear to anyone
looking at the above what Mr. Delahaye's actual address is. While
it may be a technical violation of their rules, their rules are
absurdly broken: their recommended workaround is to use a free
address and not check it, which has the net effect of not
providing other readers with a means by which to contact him (and
if he goes for the other reccomendations--check it
sporadically--it is unnecessary time wasted reading
spams). Contrary to their assertions, this is a clear violation
of netiquette.

If anyone actually blocks his account over such a triviality, I'd
recommend launching a boycott of their service.

While we're on the subject, perhaps some of us should point out
these obvious flaws to the service?

-Micah
 
E

Emmanuel Delahaye

In 'comp.lang.c' said:
Still not minding your own business. It is clear to anyone
looking at the above what Mr. Delahaye's actual address is. While
it may be a technical violation of their rules, their rules are
absurdly broken: their recommended workaround is to use a free
address and not check it, which has the net effect of not
providing other readers with a means by which to contact him (and
if he goes for the other reccomendations--check it
sporadically--it is unnecessary time wasted reading
spams). Contrary to their assertions, this is a clear violation
of netiquette.

If anyone actually blocks his account over such a triviality, I'd
recommend launching a boycott of their service.

While we're on the subject, perhaps some of us should point out
these obvious flaws to the service?

It's kind of you, but:


_____________________
/| /| | |
||__|| | Please do not |
/ O O\__ | feed the |
/ \ | Trolls |
/ \ \|_____________________|
/ _ \ \ ||
/ |\____\ \ ||
/ | | | |\____/ ||
/ \|_|_|/ | _||
/ / \ |____| ||
/ | | | --|
| | | |____ --|
* _ | |_|_|_| | \-/
*-- _--\ _ \ | ||
/ _ \\ | / `
* / \_ /- | | |
* ___ c_c_c_C/ \C_c_c_c____________
 
R

Richard Bos

Emmanuel Delahaye said:
1 - Mind your own business

He's right, though. IIRC you're even in violation of an RFC if you don't
have a valid reply-to. Apart from that, some people, me included, won't
unmunge an address to send e-mail.

Richard
 
J

Joona I Palaste

Richard Bos said:
He's right, though. IIRC you're even in violation of an RFC if you don't
have a valid reply-to. Apart from that, some people, me included, won't
unmunge an address to send e-mail.

Why won't you? Because you don't have the time? Because you don't know
how? Because you have to uphold a code of honour and to unmunge
addresses would be a disgrace?

--
/-- Joona Palaste ([email protected]) ---------------------------\
| Kingpriest of "The Flying Lemon Tree" G++ FR FW+ M- #108 D+ ADA N+++|
| http://www.helsinki.fi/~palaste W++ B OP+ |
\----------------------------------------- Finland rules! ------------/
"How can we possibly use sex to get what we want? Sex IS what we want."
- Dr. Frasier Crane
 
R

Richard Bos

Joona I Palaste said:
Why won't you? Because you don't have the time? Because you don't know
how? Because you have to uphold a code of honour and to unmunge
addresses would be a disgrace?

Because if people won't be decent netizens, keep to the RFCs and refrain
from munging their addresses (and by munging, add to the load on the
central DNS servers, and thereby to all the rest of us), I don't see why
I should make any extra effort for their sakes.

Richard
 
J

Joona I Palaste

Because if people won't be decent netizens, keep to the RFCs and refrain
from munging their addresses (and by munging, add to the load on the
central DNS servers, and thereby to all the rest of us), I don't see why
I should make any extra effort for their sakes.

Is that really *an extra EFFORT* or do you just pretend that it's one,
because by principle you stick by RFCs?

--
/-- Joona Palaste ([email protected]) ---------------------------\
| Kingpriest of "The Flying Lemon Tree" G++ FR FW+ M- #108 D+ ADA N+++|
| http://www.helsinki.fi/~palaste W++ B OP+ |
\----------------------------------------- Finland rules! ------------/
"And according to Occam's Toothbrush, we only need to optimise the most frequent
instructions."
- Teemu Kerola
 
Z

zazazazazazafdfd

From: "(e-mail address removed)" <[email protected]>

HAHAHAHAHA!

There is no need to laugh. He is using a service which
allows him to be antonymous. So he can use any address he
wants.


You CAN'T!

Although I have no objections whatsoever in your using just
about any address you fancy :cool:
 
M

Mark McIntyre

1 - Mind your own business

He's right, though. IIRC you're even in violation of an RFC if you don't
have a valid reply-to. [/QUOTE]

I have to say that I regard that particular RFC as out of date. In
this day of address harvesting bots, putting a valid email in your
usenet postings is about as sensible as leaving the front door open
and going to work.

I'm strongly of the opinion that we make life hard for spammers in
the first place, and not everyone can afford spamcop or mailwasher etc
to deal with the consequences.
Plus my ISP has enough trouble dealing with legit mail, without
expecting them to handle a zillion spams too... :)
Apart from that, some people, me included, won't
unmunge an address to send e-mail.

Fair enough. Mine's not munged, but all spam DOES get reported, as do
all attempted FW penetrations. No prisoners taken here...
 
C

cody

int main(void)
{
{
int a;
}
printf("%d\n", a); /* ERROR - Invalid */
return 0;
}


"a" doesn't have static but automatic storage class here ince it is a local
variable.
Locals are pushed on the stack when the function where they're declared gets
invoked
and are destroyed when the function returns.

void foo
{
{ int a; }
{ int b; }
}

IMHO the compiler might choose here wheather to assign a and b the same
memory location or not since you cannot use a or b together. thats similar
to declaring a union.

void foo(int a)
{
if (a)
{
int b;
}
}

The compiler might choose here wheather to allocate b at function entry or
at the
time when the block where b is declared in is entered.
 
I

Irrwahn Grausewitz

Locals are pushed on the stack when the function where they're declared gets
invoked
and are destroyed when the function returns.

There is no requirement imposed by the standard for an implementation to
provide a stack.
void foo
{
{ int a; }
{ int b; }
}

IMHO the compiler might choose here wheather to assign a and b the same
memory location or not since you cannot use a or b together. thats similar
to declaring a union.

Ahrrchrrchrrrarrrrgh-gh... WHAT? Exchanging eyeballs with tomatoes is
similar to wearing a pair of glasses?

I have to <SNIP> now...

Irrwahn
 
C

cody

There is no requirement imposed by the standard for an implementation to
provide a stack.

where should local variables be stored then? if not a stack then it must be
something similar to a stack.
Ahrrchrrchrrrarrrrgh-gh... WHAT? Exchanging eyeballs with tomatoes is
similar to wearing a pair of glasses?

i stupid comparison i know but both have the fact that more than one
variable is using the same memory location.
 
I

Irrwahn Grausewitz

where should local variables be stored then? if not a stack then it must be
something similar to a stack.

The implementation is free to store automatic variables wherever it
seems suitable, as long as it does not violate any requirements imposed
by the standard (use or even presence of a stack is not among these).

<SNIP>

Regards
 

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,085
Messages
2,570,597
Members
47,218
Latest member
GracieDebo

Latest Threads

Top