Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Compile warning due to __CONCAT redefinition #13562

Open
1 task done
TimJTi opened this issue Sep 20, 2024 · 2 comments
Open
1 task done

[BUG] Compile warning due to __CONCAT redefinition #13562

TimJTi opened this issue Sep 20, 2024 · 2 comments
Assignees
Labels
Arch: arm Issues related to ARM (32-bit) architecture Area: Board support Board support issues

Comments

@TimJTi
Copy link
Contributor

TimJTi commented Sep 20, 2024

Description / Steps to reproduce the issue

Perhaps due to me upgrading my arm gcc cross compiler recently, I'm seeing a compiler warning because of the definition of __CONCAT - in my case this is in _sama5d2x_memorymap.h but it occurs in 12 other files too

The warning is:

arm-gnu-toolchain-13.2.1-arm-none-eabi/arm-none-eabi/include/sys/cdefs.h:166: note: this is the location of the previous definition
  166 | #define __CONCAT(x,y)   __CONCAT1(x,y)

I can fix this as follows but have no idea if a better, more global fix is needed and, if so, where/how?

#ifndef __CONCAT
#  define __CONCAT(a,b) a ## b
#endif

On which OS does this issue occur?

[OS: Linux]

What is the version of your OS?

Ubuntu 22.04.5 LTS

NuttX Version

Master

Issue Architecture

[Arch: arm]

Issue Area

[Area: Board support]

Verification

  • I have verified before submitting the report.
@github-actions github-actions bot added Arch: arm Issues related to ARM (32-bit) architecture Area: Board support Board support issues labels Sep 20, 2024
@TimJTi TimJTi changed the title [BUG] <compile warning due to __CONCAT redefinition> [BUG] Compile warning due to __CONCAT redefinition Sep 22, 2024
@xiaoxiang781216 xiaoxiang781216 added the blocker Release Blocker label Oct 7, 2024
@xiaoxiang781216
Copy link
Contributor

where __CONCAT define in nuttx? @TimJTi

@xiaoxiang781216 xiaoxiang781216 removed the blocker Release Blocker label Oct 8, 2024
@TimJTi
Copy link
Contributor Author

TimJTi commented Oct 8, 2024

where __CONCAT define in nuttx? @TimJTi

@xiaoxiang781216


/home/tim/designs/nuttx/nuttx/arch/arm/src/a1x/hardware/a10_memorymap.h
  48,9: #define __CONCAT(a,b) a ## b
  49,20: #define MKULONG(a) __CONCAT(a,ul)

/home/tim/designs/nuttx/nuttx/arch/arm/src/am335x/hardware/am3358_memorymap.h
  48,9: #define __CONCAT(a,b) a ## b
  49,20: #define MKULONG(a) __CONCAT(a,ul)

/home/tim/designs/nuttx/nuttx/arch/arm/src/chip/hardware/_sama5d2x_memorymap.h
  48,9: #define __CONCAT(a,b) a ## b
  49,20: #define MKULONG(a) __CONCAT(a,ul)

/home/tim/designs/nuttx/nuttx/arch/arm/src/chip/hardware/_sama5d3x_memorymap.h
  48,9: #define __CONCAT(a,b) a ## b
  49,20: #define MKULONG(a) __CONCAT(a,ul)

/home/tim/designs/nuttx/nuttx/arch/arm/src/chip/hardware/_sama5d4x_memorymap.h
  48,9: #define __CONCAT(a,b) a ## b
  49,20: #define MKULONG(a) __CONCAT(a,ul)

/home/tim/designs/nuttx/nuttx/arch/arm/src/imx6/hardware/imx_memorymap.h
  53,9: #define __CONCAT(a,b) a ## b
  54,20: #define MKULONG(a) __CONCAT(a,ul)

/home/tim/designs/nuttx/nuttx/arch/arm/src/sama5/hardware/_sama5d2x_memorymap.h
  48,9: #define __CONCAT(a,b) a ## b
  49,20: #define MKULONG(a) __CONCAT(a,ul)

/home/tim/designs/nuttx/nuttx/arch/arm/src/sama5/hardware/_sama5d3x_memorymap.h
  48,9: #define __CONCAT(a,b) a ## b
  49,20: #define MKULONG(a) __CONCAT(a,ul)

/home/tim/designs/nuttx/nuttx/arch/arm/src/sama5/hardware/_sama5d4x_memorymap.h
  48,9: #define __CONCAT(a,b) a ## b
  49,20: #define MKULONG(a) __CONCAT(a,ul)

/home/tim/designs/nuttx/nuttx/nuttx/arch/arm/src/a1x/hardware/a10_memorymap.h
  48,9: #define __CONCAT(a,b) a ## b
  49,20: #define MKULONG(a) __CONCAT(a,ul)

/home/tim/designs/nuttx/nuttx/nuttx/arch/arm/src/am335x/hardware/am3358_memorymap.h
  48,9: #define __CONCAT(a,b) a ## b
  49,20: #define MKULONG(a) __CONCAT(a,ul)

/home/tim/designs/nuttx/nuttx/nuttx/arch/arm/src/imx6/hardware/imx_memorymap.h
  53,9: #define __CONCAT(a,b) a ## b
  54,20: #define MKULONG(a) __CONCAT(a,ul)

/home/tim/designs/nuttx/nuttx/nuttx/arch/arm/src/sama5/hardware/_sama5d2x_memorymap.h
  48,9: #define __CONCAT(a,b) a ## b
  49,20: #define MKULONG(a) __CONCAT(a,ul)

/home/tim/designs/nuttx/nuttx/nuttx/arch/arm/src/sama5/hardware/_sama5d3x_memorymap.h
  48,9: #define __CONCAT(a,b) a ## b
  49,20: #define MKULONG(a) __CONCAT(a,ul)

/home/tim/designs/nuttx/nuttx/nuttx/arch/arm/src/sama5/hardware/_sama5d4x_memorymap.h
  48,9: #define __CONCAT(a,b) a ## b
  49,20: #define MKULONG(a) __CONCAT(a,ul)


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Arch: arm Issues related to ARM (32-bit) architecture Area: Board support Board support issues
Projects
None yet
Development

No branches or pull requests

3 participants