C 99 data types?

Go To Last Post
9 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This is the problem I have.

I use a compiler at work where variables are of known length and type. UInt8_T, UInt16_T and others of similar definition. I also want to develop code using the Bloodshed compiler. (Dev-C++4.9.9.2)

I understand this is a GCC forum but I can't figure out how to configure Dev-C++ to C99. Is there a include file anyone can point me to that will typedef standard C variable typs to C99 types? Or how about a setting in Dev-C++?

Help would be appreciated.

Some Guy

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Have you tried a Google search for UInt8_T?

- John

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It's uint8_t, not UInt8_T (this is C which is a case-sensitive
language).

These data types are (according to the C99 standard) declared in
the include file .

For C99, make sure you specify either -std=c99 or -std=gnu99 on the
command-line. The default is -std=gnu89 which is C89 plus many GCC
extensions. While most of the extensions later became part of C99,
some are deliberately disabled in that mode, like the declaration of
a variable within a "for" statement.

Jörg Wunsch

Please don't send me PMs, use email if you want to approach me personally.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

dl8dtl wrote:
It's uint8_t, not UInt8_T (this is C which is a case-sensitive
language).

Try a Google search for UInt8_T if you are curious why I stuck with the original case mixing. One might think that somebody has been gaming the page rank. :lol:

- John

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Google searching is case-insensitive; I get the same result for
uint8_t or UInt8_T. But agreed, it's funny that the avr-libc
docs rank #1 for this today...

Jörg Wunsch

Please don't send me PMs, use email if you want to approach me personally.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think you guys are just really good (in a favorable way).

- John

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Probably because the AVR toolchain has become so popular... :)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So it turns out that the variable types I mentioned were typedefed with capitals (UInt8_T, UInt16_T) in a header file for some reason. A couple of different companies have been working on the code so I have no idea why it was done. I searched the compiler folder case sensitive which would explain why uint8_t didn't show up.

I'm developing sections of the code on a PC because downloading to the unit takes well over a minute and the only debugging tool I have is a serial port. BTW, the product I am working on is commonly referred to as "The Tar Baby".

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I imagine that many projects get that name while certain coders on a project are having a STYLE and PORTABILITY struggles.