tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Tinycc-devel] Diagnostics issue with Atomics


From: Tyge Løvset
Subject: [Tinycc-devel] Diagnostics issue with Atomics
Date: Thu, 17 Oct 2024 21:47:41 +0000

Hi, I incorrectly get a warning when calling free() on an _Atomic pointer, and I suspect it will happen elsewhere too. Both Windows and Linux. Does _Atomics have some “special” qualifiers attached which gives this? You normally see it when violating constness.

 

    _Atomic(long)* x = malloc(sizeof *x);

    …

    free(x);

 

warning: assignment discards qualifiers from pointer target type

 

Cheers

Tyge Løvset
Seniorforsker
Senior Researcher


+47 56 10 75 92
+47 932 67 779

Jahnebakken 5, 5007 Bergen, Norway

norceresearch.no


reply via email to

[Prev in Thread] Current Thread [Next in Thread]