Sponsored Content
Full Discussion: warning from gcc
Top Forums Programming warning from gcc Post 81180 by sledge76 on Wednesday 17th of August 2005 05:03:16 AM
Old 08-17-2005
warning from gcc

I get this error warning.
test.c: In function 'main':
test.c:5: warning: incompatible implicit declaration of built-in function 'memset'


After compiling this code
Code:
#include <stdio.h>
int main() {
        char pBuffer[32];
        memset(pBuffer, 0, 32);  
        return 0;
}

What seems to be the reason for this trouble?
I searched Google all day about this, but I couldn't figure out why.

my gcc version is following
>gcc -v
Using built-in specs.
Target: i386-portbld-freebsd5.3
Configured with: ./..//gcc-4.0-20050728/configure --disable-nls --with-system-zlib --with-libiconv-prefix=/usr/local --program-suffix=40 --libdir=/usr/local/lib/gcc/i386-portbld-freebsd5.3/4.0.2 --with-gxx-include-dir=/usr/local/lib/gcc/i386-portbld-freebsd5.3/4.0.2/include/c++/ --disable-shared --prefix=/usr/local i386-portbld-freebsd5.3
Thread model: posix
gcc version 4.0.2 20050728 (prerelease) [FreeBSD]


When I was using gcc 3.4.x, there was no warning.
But after upgrading to gcc 4.0.2, I have this error.
Do I have to downgrade gcc?
 

10 More Discussions You Might Find Interesting

1. Programming

gcc compiler warning

The gcc compiler is giving following error in my code. Can Anyone help, why is this warning popping up. "void format, different type arg (arg 1)" The function's on which warning is given, looks like this: void fprint_stderr_sockarray(int* sockets) { .......... .......... } (2 Replies)
Discussion started by: Ahsan
2 Replies

2. 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

3. Programming

A problem of GCC

Hi mates, I am a new comer of this forums. I have a problem while using function "fread(buffer, size, number, file-pointer)" to read a binary file. While I used the "fread()" to read the binary file under Solaris UNIX System, it worked very well. But it gets a incorrect result... (6 Replies)
Discussion started by: cquedugdylp
6 Replies

4. Programming

gcc installation

hi , iam trying to install gcc compiler on a sun sparc sytem running solaris 9 . i have searched the internet for documentaion on how to install gcc , but the steps are unclear . could anyone help me with a document , because the documentaions i found are really confusing . thank you... (1 Reply)
Discussion started by: itspascal
1 Replies

5. 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

6. Programming

gcc compiler

i write c++ code it run perfectely with g++ compiler but same code when i compile with GCC compiler it gives linker error , followed these linker error /tmp/ccfZtXOQ.o(.text+0x22): In function `main': conf_system.cpp: undefined reference to `operator new(unsigned int)'... (5 Replies)
Discussion started by: munnu
5 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

help with gcc warning

I get the following gcc warning. I do not see a double being declared anywhere... how can I fix this? (This code is just an example, I realize that the first if bracket will never be executed.) #include <stdio.h> int main(void) { float A = 0.0; int B = 150; if(B == 0) ... (1 Reply)
Discussion started by: limmer
1 Replies

9. Programming

gcc: warning: will never be executed

I get this gcc warning, but the function works correctly. Any ideas? #include <stdio.h> #include <string.h> #include <ctype.h> int main(void) { char A = ""; strcat(A, "Hello World!"); int COUNT = 0; while(A) { A = (char)(tolower(A)); ... (7 Replies)
Discussion started by: limmer
7 Replies

10. 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
TIFFWarning(3tiff)														TIFFWarning(3tiff)

NAME
TIFFWarning, TIFFSetWarningHandler - library warning interface SYNOPSIS
#include <tiffio.h> void TIFFWarning(const char* module, const char* fmt, ...) #include <stdarg.h> typedef void (*TIFFWarningHandler)(const char* module, const char* fmt, va_list ap); TIFFWarningHandler TIFFSetWarningHandler(TIFFWarningHandler handler); TIFFWarning invokes the library-wide warning handler function to (normally) write a warning message to stderr. The fmt parameter is a printf(3S) format string, and any number of arguments can be supplied. The module parameter is interpreted as a string that, if non-zero, should be printed before the message, and is typically used to identify the software module in which a warning is detected. Applications that desire to capture control in the event of a warning should use TIFFSetWarningHandler to override the default warning han- dler. A NULL(0) warning handler function may be installed to suppress error messages. TIFFSetWarningHandler returns a reference to the previous error handling function. See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWTiff | +-----------------------------+-----------------------------+ |Interface stability |Uncommitted | +-----------------------------+-----------------------------+ libtiff(3), TIFFError(3tiff), printf(3S) This man page was originally written by Sam Leffler. Updated by Breda McColgan, Sun Microsystems Inc., 2004. 02 Apr 2004 TIFFWarning(3tiff)
All times are GMT -4. The time now is 08:48 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy