0

I used clang to perform some analysis on my code for a PIC18 microcontroller. It gets lots of errors and which seem to be caused by lines in the headers like this.

extern volatile unsigned char ANSELA @ 0xF38;

I understand what this is doing, mapping a symbol to a register on the chip, however is this standard C or is this a microchip only extension for their compilers?

DanUK86
  • 33
  • 6

1 Answers1

2

however is this standard C or is this a microchip only extension for their compilers?

It is not Standard C but it is a common extension used by some C embedded compilers.

See my answer here on this specific topic:

@ sign in C variable declaration

Community
  • 1
  • 1
ouah
  • 142,963
  • 15
  • 272
  • 331
  • @JonathanLeffler Well actually I starting answering when I noticed I may have already answered a similar question. Must be a dup. – ouah Dec 05 '14 at 22:22
  • 1
    I do that too -- answer a question and then realize I've answered something very similar before, so it must be a dup. – Jonathan Leffler Dec 05 '14 at 22:23