Bug found in GCC-AVR/ AVRStudio - Page 2

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Re: Bug found in GCC-AVR/ AVRStudio
On Tue, 18 Jan 2005 11:12:06 +0100, David

Quoted text here. Click to load it

Not unless there was a standard for C other than the original de facto
one, K&R 1 published in 1978.  Even that text stated that the result
of attempting to modify a string literal was undefined.

Quoted text here. Click to load it

Yes, this code is perfectly legal, and it causes no problem with
implementations that put code into EPROM/flash/write-protected memory.
You can always assign a pointer to a more qualified (with const and/or
volatile) object with the address of a less qualified object of the
same type.  And if the compiler put 'i' in read-only memory it would
be seriously non-conforming.  Because:

 *((int *) p) = 100;

...is legal code and does what you expect.  You can cast away
"const-ness" as long as the object was not actually defined const.

Adding the const qualifier to the type pointed to by a pointer does
not mean it can actually only point to const objects.  It merely says
that you will not modify the object through the pointer.

If you cast away the const and attempt to modify the object, it is
well defined if the object is not const, undefined if it is.

Quoted text here. Click to load it

--
Jack Klein
Home: http://JK-Technology.Com
We've slightly trimmed the long signature. Click to see the full one.
Re: Bug found in GCC-AVR/ AVRStudio

Quoted text here. Click to load it
I am pretty sure ImageCraft's AVR compiler does what Jack is saying.
Basically, we do "reasonable" without going thru extreme heroics.

Quoted text here. Click to load it
Make that EXTREMELY inefficient :-)

--
// richard
http://www.imagecraft.com

Re: Bug found in GCC-AVR/ AVRStudio
On Tue, 18 Jan 2005 19:29:23 -0800, "Richard M."

Quoted text here. Click to load it
[...]
Quoted text here. Click to load it

Have you tried it?  I'm curious because I've used 8051 compilers that
have generic pointers, and the code produced is not unreasonable.  And
there have been cases where the capability would have been welcome.

I may try it someday, though I'm sure an implementor could do a better
job.  And an implementor could use them for functions like memcpy and
puts.

   enum memory_space {RAM, FLASH, EEPROM};
   typedef enum memory_space Memory_Space;
   typedef uint16_t  Address
   struct generic_ptr
   {
      Memory_Space   space;
      Address        adr;
   };
   typedef struct generic_ptr Generic_Ptr;

   extern Generic_Ptr GP_make(Memory_Space s, Address adr);
   extern void GP_write(Generic_Ptr p, void *src, size_t len);
   extern void GP_read(void *dest, Generic_Ptr p, size_t len);
   extern void GP_copy(Generic_Ptr d, Generic_Ptr s, size_t len);

Of course, this all assumes that pointers that did not need to be
generic would not be made generic.  Like the 8051 compilers.

Regards,
      
                               -=Dave
--
Change is inevitable, progress is not.

Re: Bug found in GCC-AVR/ AVRStudio
Quoted text here. Click to load it

also does not bother to reveal a solution when found.  Thus I
recommend ignoring him.

--
"If you want to post a followup via groups.google.com, don't use
 the broken "Reply" link at the bottom of the article.  Click on
We've slightly trimmed the long signature. Click to see the full one.
Re: Bug found in GCC-AVR/ AVRStudio
Quoted text here. Click to load it

My vote, too for a PLONK.

Let's give him an opportunity:

Please post a minimal example which does not
behave. Compile the code and run

   avr-objdump -D testfile.elf >testfile.dis

and post the output.

My feel is that this is an erroneous diagnosis
of some other problem.

----

Please post the solution with the original header line
added with '(solved)'. After pondering with a problem,
we deserve to hear what was the culprit to be able
to avoid it later.

--

Tauno Voipio
tauno voipio (at) iki fi


Re: Bug found in GCC-AVR/ AVRStudio
Sorry, actually I do not intend to not reveal the solution of this
thread, as the solution is my very careless mistake and does not have a
greal learning value.


Re: Bug found in GCC-AVR/ AVRStudio
Quoted text here. Click to load it

You're like a broken record -- I think the most important feature of
usenet is information sharing. Careless or not, if you don't share
you're using a resource without giving back. That's freeloading.

Brett Foster

Re: Bug found in GCC-AVR/ AVRStudio
I have written the careless mistake in the previous thread I posted.
Please check!


Re: Bug found in GCC-AVR/ AVRStudio

Quoted text here. Click to load it

Ok, I think your another one on my spam-list, so I don't waste my time
reading your posts.
--
42Bastian
Do not email to snipped-for-privacy@yahoo.com, it's a spam-only account :-)
We've slightly trimmed the long signature. Click to see the full one.
Re: Bug found in GCC-AVR/ AVRStudio

Quoted text here. Click to load it

You started a thread claiming to have found a bug in gcc-avr, and
apparently it was your own mistake.  Well, we all make mistakes - but we
don't all start off by accusing others and then refusing to acknowledge
the mistake.  Remember, these posts are archieved for the benifit of
future users - you have a responsibility to make it clear to current and
future readers that your problem was not caused by a bug in avr-gcc.
Anything less is a grave disservice to the avr-gcc team, who have provided
you with an excellent set of tools, asking nothing in return but a bit of
respect.


Re: Bug found in GCC-AVR/ AVRStudio
The careless mistake is in the other thread. I have clarify the mistake
in this thread.


Re: Bug found in GCC-AVR/ AVRStudio
Quoted text here. Click to load it

You are continuing to annoy by failing to quote the material to
which you reply, and by refusing to expound what the mistake was.
Vague references to other threads won't do.  The fact that you will
get no help later when you need it should induce you to reform.

You have seen my sig several times, so there is no longer any
excuse for refusing to quote.

--
"If you want to post a followup via groups.google.com, don't use
 the broken "Reply" link at the bottom of the article.  Click on
We've slightly trimmed the long signature. Click to see the full one.
Re: Bug found in GCC-AVR/ AVRStudio
May be u can pop the reply tree at the left side to help u locate the
link positions.

As I have seen other threads there are a lot of posts not quoting and I
feel no problem to see the posts. So I also have not this custom to
quote texts. I do not understand why u have so much difficulties to
see.


Re: Bug found in GCC-AVR/ AVRStudio

Quoted text here. Click to load it

Oh for pete's sake, the word is "you".

You're Welcome.

--
Grant Edwards                   grante             Yow!  for ARTIFICIAL
                                  at               FLAVORING!!
We've slightly trimmed the long signature. Click to see the full one.
Re: Bug found in GCC-AVR/ AVRStudio
Quoted text here. Click to load it

You (not u) have no idea what you are talking about.  The world
does not revolve around google.  There is no such thing as a reply
tree, a left side, etc.

--
"If you want to post a followup via groups.google.com, don't use
 the broken "Reply" link at the bottom of the article.  Click on
We've slightly trimmed the long signature. Click to see the full one.
Re: Bug found in GCC-AVR/ AVRStudio

Quoted text here. Click to load it

I ( this is really just one letter :) have a my tea pot on the left
side and the mouse on the right side, but I don't claim this to be a
standard among professional developers.


Quoted text here. Click to load it

It is common sense to quote to what you are referring, so if you like
to get answers for your problems, you should act like this.

--
42Bastian
Do not email to snipped-for-privacy@yahoo.com, it's a spam-only account :-)
We've slightly trimmed the long signature. Click to see the full one.
Re: Bug found in GCC-AVR/ AVRStudio
Quoted text here. Click to load it

First: it is common netiquette to quote what you are replying to.
Second: I can subscribe to a newsgroup at any time and see your reply while
not seeing  the original post (not on the server anymore) you are replying
to. And at such a point, your reply is completely bollocks to me

Meindert



Re: Bug found in GCC-AVR/ AVRStudio
Moreover, from my personal feeling, sometimes not quoting is more clear
as the reader do not need to locate the answer.


Re: Bug found in GCC-AVR/ AVRStudio

Quoted text here. Click to load it

You have not clarified anything - you have merely made repeated claims
about clarifications, and about having made some silly mistake that you
refuse to expand on.  Lots of people come to newsgroups like this one
looking for help, only to find they have made a silly mistake - but maybe
they and others learn something new anyway.  A silly mistake for one
person might be a fundamental misunderstanding for another - that's why
it's important to share the information.

And we are all still waiting to hear your apology to the avr-gcc team for
your unfounded allogations.


Re: Bug found in GCC-AVR/ AVRStudio
I have clarified in that post what the silly mistake is. And questions
in that post is unrelated to questions of this post. So I do not tell u
one more what the silly mistake is in this post to avoid confusion. Do
not say I have not clarifed, I have already clarified a long time ago
after your first advice. please check clearly and firstly.


Site Timeline