public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Can global variables be initiated just after the entry of the main function?
@ 2020-07-04 13:53 孙世龙 sunshilong
  0 siblings, 0 replies; only message in thread
From: 孙世龙 sunshilong @ 2020-07-04 13:53 UTC (permalink / raw)
  To: gcc-help

Hi, list

I know that global variables are normally initiated before the entry
of the main function.
But I still have a question:
can global variables be initiated just after the entry of the main
function in C or C++?
If not, could you please give me some reasons?
If it's ok, how can I achieve this goal? What compile options should I use and
is there some potential problem that I should be aware of?

Thank you for your attention to this matter.
Best Regards.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-07-04 13:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-04 13:53 Can global variables be initiated just after the entry of the main function? 孙世龙 sunshilong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).