gcc tag

31 questions


1 answers
74 views
0
What kind of GCC flag do you use when compiling C?

All I know is -Wall, -std=XXX.I want to know the flag that changes warning or warning to errorI searched it on Google and it's all in English so I can't understandㅠ

2 years ago

1 answers
73 views
0
What does "void *p = &&abc;" do?

void *p = &&abc;I saw a code like this, but I don't know what it's doing. I've seen a lot of double pointers, but doesn't & mean the address?And you need two operands, so this isn't it.Wha...

2 years ago

2 answers
105 views
0
[OS X] When using the -static option with gcc, clang : error occurs.

I wrote a c code to run a simple shell, gave the -static option to gcc, and compiled it.The following error occurs:ld: library not found for -lcrt0.oclang: error: linker command failed with exit code ...

2 years ago

1 answers
127 views
0
Is there a way not to open the unused parameter warning?

Is there a way to prevent the unused parameter warning from appearing on the C code?For example, Bool NullFunc(const struct timespec *when, const char *who, unsigned short format, void *data, int len)...

2 years ago

1 answers
95 views
0
Is there any way to prevent "deferred conversion from string constant to 'char*'" from appearing on GCC?

I recently upgraded to gcc4.3, and the following warning appears after that.I think this happened by writing char* where you need to write const char*. My code is really long. (Almost 500 files)Cannot...


2 answers
82 views
0
To view the assembled results in gcc

I received a task to analyze the results of the compiled code, but I'm not used to gcc yet, so I don't know what options to give. How do I view the assembly code of C/C++ in gcc?

2 years ago

1 answers
55 views
0
Preprocessor C treated linux as constant 1. Why is that?

Preprocessor C in GCC treated variable name linux as constant 1.//test.c:#include <stdio.h>int main(void){ int linux = 5; return 0;}Looking at the result of pretreating this with gcc-E test.c,...

2 years ago

1 answers
115 views
0
How can I view the C mnemonic code in GCC?

The assembly that I made myself,Compared to the assembly that GCC converted in C,I want to compare how well it optimizes.Is there such a function in C like looking at machine language on Java and mnem...

2 years ago

1 answers
104 views
0
Is strlen() calculated every time in the for statement?

for (int i = 0; i < strlen(ss); ++i){ // Hello}If you think about it, the ss might change inside the for statementI think strlen(ss) should be calculated every timeBut if you do strlen() every time...

2 years ago

2 answers
80 views
0
I'd like to ask you a question about Unicode Korean printout on C++.

#include <iostream>#include <clocale>using namespace std;int main() { setlocale(LC_ALL, ); wchar_t str1[] = LWBCS 1; wchar_t str2[100]; wchar_t str3[50]; wcout << str1 << endl;...

2 years ago
« - 3 - »

© 2024 OneMinuteCode. All rights reserved.