Skip to main content
Charles Miller
Associate III
July 29, 2020
Question

Use of __LINE__ as a macro parameter conflicts with standard C usage.

  • July 29, 2020
  • 1 reply
  • 1000 views

Several macros in stm32f4xx_hal_exti.h use __LINE__ as a macro parameter. Example:

#define IS_EXTI_PENDING_EDGE(__LINE__) ((__LINE__) == EXTI_TRIGGER_RISING_FALLING)

__LINE__ is a reserved preprocessor symbol which expands to the integer line number of the file in which it is parsed. It should not be used as it is now. F4 HAL library v1.25 (and others).

This topic has been closed for replies.

1 reply

Amel NASRI
ST Technical Moderator
September 25, 2020

Hi @Charles Miller​ ,

Even if it is with some delay, it remains relevant to report what you highlighted to our development team. This is what I did.

Thanks,

-Amel

To give better visibility on the answered topics, please click on "Best Answer" on the reply which solved your issue or answered your question.