GCC questions...


 
Thread Tools Search this Thread
Top Forums Programming GCC questions...
# 1  
Old 11-24-2011
GCC questions...

Hi,
i want to do some manipulation of gcc outputs,
and have some questions:
1. i am trying to check what kind of outputs i can get after running gcc on a *.c file, but except for errors or warnings i don't see anything.
so, what outputs can i get from gcc?

2. does all error and warnings will come with "error:" or "warning:" (i am asking that to know what to grep...

thanks!
# 2  
Old 11-24-2011
Quote:
Originally Posted by eee
1. i am trying to check what kind of outputs i can get after running gcc on a *.c file, but except for errors or warnings i don't see anything.
so, what outputs can i get from gcc?
You can check the return value - it will be 0 if no errors were emitted (but in this case warnings may have been emitted).


Quote:
Originally Posted by eee
2. does all error and warnings will come with "error:" or "warning:" (i am asking that to know what to grep...
So far as I know, yes - they're all in the form "file:line: X: message" where X is "error" or "warning" (there's also "note" as well, but they're rare) - e.g. "test.c:16: warning: control reaches end of non-void function".
# 3  
Old 11-24-2011
GCC questions...

as for the second question - thanks, i thought so too, and now i am more sure Smilie

as for the first one, i will try to clarify my question:
i didnt meant what return value i am getting from gcc,
when i run gcc four some kind of source file (*.c), should i suppose to get any output to stdout if everthing is ok?
now i see you write "notes", so are there other stuff?

thanks.
# 4  
Old 11-24-2011
Quote:
Originally Posted by eee
when i run gcc four some kind of source file (*.c), should i suppose to get any output to stdout if everthing is ok?
No.
# 5  
Old 11-24-2011
so gcc doesnt print anyting to stdout?
# 6  
Old 11-24-2011
Quote:
Originally Posted by eee
so gcc doesnt print anyting to stdout?
No, as @fpmurphy said gcc does not generate any message if everything is ok.
if you want to see any infos even if gcc successfull maybe you can try some options..
Code:
# with -v(verbose)
builtin gcc options
used thread model std in compiled code (executable in memory)
preprocessor options ..
compiling options ..
ggc (gcc's garbage collector) options .. 
assembly options ..
linking options ..
# with -time (times)
.....
.....
.....

regards
ygemici
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. HP-UX

Gcc .bz2

Hello, I need to install GCC but the only archive (GCC-4.9.2) for it I can find is a .bz2 format file. Looking at https://www.unix.com/shell-programming-and-scripting/105282-how-unpack-install-tar-bz2-library.html provided some help, but when I use tar in that way I get the following,... (8 Replies)
Discussion started by: YogaBija
8 Replies

2. Programming

C multiplication with GCC

Hi all, newbie here. Does anyone know if it is possible to use GCC or Clang to multiply two unsigned numbers and have it use for intel instructions, the mull instruction or an imul. I can't figure how to word this to accomplish this task: (int)(((unsigned long long)result * (unsigned)2290649225)... (4 Replies)
Discussion started by: pheonix
4 Replies

3. Homework & Coursework Questions

Print questions from a questions folder in a sequential order

1.) I am to write scripts that will be phasetest folder in the home directory. 2.) The folder should have a set-up,phase and display files I have written a small script which i used to check for the existing users and their password. What I need help with: I have a set of questions in a... (19 Replies)
Discussion started by: moraks007
19 Replies

4. UNIX for Dummies Questions & Answers

Help with gcc and g++

Hi, I have recently got a job in unix, now training is going on and we have been practicing on telnet, so to practice at home I have installed vmware(virtual machine) and planning to download ubuntu. So my doubt is that whether I can write c and cpp progs in vi editor and can I run them by default... (5 Replies)
Discussion started by: vishal.973s
5 Replies

5. Shell Programming and Scripting

gcc compiler

I am using open suse linux. I want to install gcc compiler in my machine. I ahve checked man gcc and man cc. But it's not there. Can someone help me (4 Replies)
Discussion started by: pritish.sas
4 Replies

6. Programming

Not able to run gcc

Hi, I am working with solaris 9(SunOS mgsun 5.9 Generic_112233-07 sun4u sparc SUNW,Sun-Blade-100).I install the gcc 3.4.6 from sunfreeware website and when I am trying to run it,I am getting the error-- # gcc ld.so.1: gcc: fatal: libiconv.so.2: open failed: No such file or directory Killed... (12 Replies)
Discussion started by: smartgupta
12 Replies

7. Solaris

Installing gcc - recieve error message gcc : cannot execute

AIM- Install Oracle 11g on Solaris using VMWare Steps 1.Logged on as root 2.Created subfolders à /usr/local/bin & /usr/local/bin/gcc 3.Downloaded gcc & libiconv & unzipped them on my harddrive & burnt them on CD 4.Copied files from CD to /usr/local/bin/gcc 5.Terminal (root) à pkgadd -d... (8 Replies)
Discussion started by: Ackers
8 Replies

8. Programming

Enabling Far in GCC

hello, i want to enable far in gcc, how to enable this. pls reply back thanx in advance. svh (1 Reply)
Discussion started by: svh
1 Replies

9. Programming

Gcc

Dear all, Any body please guide, i require a C which will run in Linux environment. Its urgent please. warm regards, Senthil K (1 Reply)
Discussion started by: Senthil
1 Replies

10. Programming

gcc update

Hai Friends How should i update gcc (version 3.2.1) to gcc (version 3.2.2). I am using FreeBSD 5.0 RELEASE Thanks in advance Collins (0 Replies)
Discussion started by: collins
0 Replies
Login or Register to Ask a Question