Timeline for STM32F4 series: what does the '->' operator? [closed]
Current License: CC BY-SA 4.0
17 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 25, 2019 at 14:49 | comment | added | followed Monica to Codidact | @MarcusMüller everything is about embedded programming in the question, except the answer. | |
Jun 25, 2019 at 14:02 | comment | added | Marcus Müller |
@berendi yeah, the way the unsigned integer literals behind these definitions are converted to pointers is indeed implementation-specific, but RCC is a pointer by type (through being #define RCC ((RCC_TypeDef *) RCC_BASE) ), no matter how that pointer got its value. So, albeit the language lawyers having a point about whether the way the source code defines that pointer, it doesn't change the fact that pointer_type->member is really standard C and not implementation-specific at all.
|
|
Jun 25, 2019 at 13:47 | comment | added | followed Monica to Codidact |
@MarcusMüller I assume you are famiar with the definition of RCC in the stm32 headers. Using the -> operator on a pointer acquired by converting a nonzero integer constant to a pointer is certainly implementation defined, maybe even undefined behaviour. Imagine asking this on stackoverflow, language lawyers would come down on the question with all their wrath. This question makes sense only in an embedded context.
|
|
S Jun 25, 2019 at 12:02 | history | edited | JimmyB | CC BY-SA 4.0 |
improve readability
|
S Jun 25, 2019 at 12:02 | history | suggested | Mike | CC BY-SA 4.0 |
improve readability
|
Jun 25, 2019 at 11:40 | review | Reopen votes | |||
Jun 25, 2019 at 18:36 | |||||
Jun 25, 2019 at 11:06 | comment | added | Marcus Müller | @berendi none of the question revolves around microcontroller programming. OP simply doesn't know basic C Struct pointer handling. OP claiming this is specific to STM32F4 has nothing to do with it actually being specific to microcontroller programming. (it's simply not) | |
Jun 25, 2019 at 10:49 | history | closed |
Marcus Müller Chupacabras Colin Sean Houlihane Lundin |
Not suitable for this site | |
Jun 25, 2019 at 10:48 | comment | added | Lundin | "Since I never found "->" in C language" Then you never found a beginner-level C programming book either. Learn fundamental C programming before attempting to read C code, maybe... | |
Jun 25, 2019 at 10:21 | answer | added | followed Monica to Codidact | timeline score: 4 | |
Jun 25, 2019 at 10:13 | review | Suggested edits | |||
S Jun 25, 2019 at 12:02 | |||||
Jun 25, 2019 at 9:43 | comment | added | followed Monica to Codidact | @MarcusMüller Writing firmware for microcontrollers is considered ontopic here. it's an instruction strictly related to configuration of STM32F4 family makes it a firmware related question even though the answer is no. Compare with this one | |
Jun 25, 2019 at 9:35 | review | Close votes | |||
Jun 25, 2019 at 10:50 | |||||
Jun 25, 2019 at 9:16 | comment | added | Marcus Müller | I'm voting to close this question as off-topic because this is not an electronic engineering, but a (C language) programming question. | |
Jun 25, 2019 at 9:01 | history | edited | Michel Keijzers |
edited tags
|
|
Jun 25, 2019 at 9:01 | answer | added | Michel Keijzers | timeline score: 9 | |
Jun 25, 2019 at 8:54 | history | asked | LittleSaints | CC BY-SA 4.0 |