Motherboard Forums


Reply
Thread Tools Display Modes

Any Large Integer Libraries Out There for the ARM?

 
 
Noob
Guest
Posts: n/a
 
      04-27-2012, 02:39 PM
David T. Ashley wrote:

> Noob wrote:
>
>> AFAIR, gcc supports restrict even in (non-pedantic) C89 mode.

>
> Could you define "pedantic" in this usage?
>
> I looked up the word in a dictionary and also looked at compiler
> options, and the meaning of the word really isn't making sense to me.
>
> What is "pedantic"?


I was referring to GCC's "-pedantic" option.

cf. http://gcc.gnu.org/onlinedocs/gcc/Wa...x-pedantic-252

Regards.
 
Reply With Quote
 
 
 
 
Noob
Guest
Posts: n/a
 
      04-27-2012, 02:41 PM
Christopher Head wrote:
> On Thu, 26 Apr 2012 22:59:09 +0200
> Hans-Bernhard Bröker <(E-Mail Removed)> wrote:
>
>> I'm afraid you're overlooking the aliasing issue. Just because
>> _your_ function doesn't modify those values doesn't mean they won't
>> change mid-stride, which could actually _require_ the function to
>> keep reading the original value through the pointer.
>>
>> E.g. what do you think would happen if I did something (admittedly)
>> crazy equivalent to
>>
>> uint32_t mynum[10];
>> mul_32_96(/*in32*/mynum + i, /*in96*/ mynum + 1, /*out*/mynum);

>
> Doesn't the C strict aliasing rule make this unspecified behaviour?
> Pointers to different types neither of which are
> (signed|unsigned|blank) char and which aren't related by one being an
> element of the other are assumed not to alias.


He didn't provide the prototype of mul_32_96, but given the
function call, one could assume

void mul_32_96(uint32_t *in32, uint32_t *in96, uint32_t *mynum);

where aliasing could indeed happen.
 
Reply With Quote
 
 
 
 
Christopher Head
Guest
Posts: n/a
 
      04-27-2012, 02:57 PM
On Fri, 27 Apr 2012 16:41:52 +0200
Noob <root@127.0.0.1> wrote:

> He didn't provide the prototype of mul_32_96, but given the
> function call, one could assume
>
> void mul_32_96(uint32_t *in32, uint32_t *in96, uint32_t *mynum);
>
> where aliasing could indeed happen.


In that case it could. I assumed in96 was some kind of 96-bit-long
type, probably a struct. If they're all uint32_t pointers, then of
course they could alias.

Chris
 
Reply With Quote
 
David T. Ashley
Guest
Posts: n/a
 
      04-27-2012, 05:06 PM
On Fri, 27 Apr 2012 16:22:06 +0200, David Brown
<(E-Mail Removed)> wrote:
>
>"Pedantic" means "particularly fussy or detailed". With gcc, using
>"pedantic" means that the compiler will be much stricter about
>supporting the standards, and /only/ the standards. For example,
>"restrict" and "inline" are keywords in later C standards, but were not
>available in earlier ones. gcc likes to give you more features than the
>standards demand, so that you can use these features when compiling in
>C89 mode. But to allow for people who happened to have a function
>called "restrict" and a typedef called "inline", which is legal in C89
>but not C99, you can compile in "pedantic" mode. (You can still access
>newer features as "__restrict__" or "__inline__" for example.)
>"pedantic" mode is also useful for checking strict standards
>compatibility to aid portability of code.


Thanks, now I understand.

Using www.dictionary.com, I got this:

1. ostentatious in one's learning.
2. overly concerned with minute details or formalisms, especially in
teaching.

The definition you provided is (I think) #2, and it wasn't clicking
for me by just reading the dictionary definition and the documentation
of the compiler parameter.

DTA
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Any Interest in Open-Source Math/Utility Libraries for Small Microcontrollers? David T. Ashley Embedded 5 08-28-2007 03:18 PM
AI booster error message: "-" is not a valid Integer wally Asus 1 11-11-2005 09:59 AM
Are there any laptops out there with 4GB RAM capacity? Craig Wanke Laptops 3 12-09-2003 12:43 PM
Any PCM audio amplitude manipulation libraries available? Deathstar Embedded 4 09-12-2003 05:20 PM
pIII sustained integer performance problem Kamen Yotov Intel 0 07-03-2003 08:03 PM


All times are GMT. The time now is 02:31 PM.


Welcome!
Welcome to Motherboard Point
 

Advertisment