Похожие чаты

@QNeko @MasterZiv I don't see anything there specifying your described

behavior of static variables inside functions. Also i can't see anything you described in my armv7e-m disassembly 🤔

Is it maybe OS/compiler dependent? Would be nice to know if and whers something like u describe exists

5 ответов

6 просмотров

they are static local variables

https://godbolt.org/z/ReY13f

on ARM: https://godbolt.org/z/XcxPNy

Variables declared at block scope with the specifier static have static storage duration but are initialized the first time control passes through their declaration

This article describes behavior of static variables inside any block , including function body. https://en.cppreference.com/w/cpp/language/storage_duration#Static_local_variables Unless section (unless their initialization is zero- or constant-initialization, which can be performed before the block is first entered)says that in these particular cases initialization can be performed earlier then first time control passes through the declaration.

Похожие вопросы

Обсуждают сегодня

Is UniBright Freequity an active live product ? A friend here in Asia was discussing the Tokenisation of RWA’s in his case Real Estate as he’s a developer with numerous overs...
Digital Trust
4
Hi, is it fine to use git to backup my config? I did so many things that I don't want to miss if I switched to another OS, so how do you backup your home and configs? And shou...
Adnan Al_Beda
30
коллеги, добрый вечер! А никто не знает как модальная форма может себя закрыть? Ну допустим модальная форма определила, что смысла ей работать нет и хочет вернуть modalResult...
Михаил
83
Добрый день задумываюсь о создание токена из за того что много свободного времени и вот я узнал что транзакции за перевод этого токена будут в waves и тут пришла идея при тран...
Артем
3
А если изначально бот работал так : есть сайт онлайн школы. У каждого ученика свой кабинет. Где он авторизуется по своим данным. И уже в кабинете, на самом сайте делает оплату...
Денис 💡 Фрилансер
13
А что ты вообще делаешь ?
Yesgoter
13
На работе пишем распределенное приложение, у которого сотни, если не тысячи настроек. Конфиги написаны на xml, расположены на разных хостах и должны быть согласованы друг с др...
Aleksandr Druzhinin
5
Crypto aman premium grp koi join kiya hai... Kaisa hai service any one idea??
Arvind Sharma
16
Всем привет 🙂 Какая-то непонятная проблема у меня с видео, раньше такого не было. Загружаю видео с гугл диска именно в видео mp4 и меняю ссылку как положено вот она: https://d...
Ксюша|Верстка на Тильде|Дизайн 🦥
6
средствами IBX как-то можно выполнить запрос insert ... returning?
Igor
31
Карта сайта