gdutayj 发表于 2012-11-8 02:18:04

icc编译出现calling a function without prototype问题?

C:\iccv7avr\bin\imakew -f MAIN.mak
    iccavr -c -e -D__ICC_VERSION=722 -DATMega16-l -g -MLongJump -MHasMul -MEnhancedtemrun.c
!W F:\ICCAVR\温控2\temrun.c(128): calling a function without prototype may cause runtime errors if the function
does not return int or unsigned int
!W F:\ICCAVR\温控2\temrun.c(129): calling a function without prototype may cause runtime errors if the function
does not return int or unsigned int
    iccavr -o MAIN -g -e:0x4000 -ucrtatmega.o -bfunc_lit:0x54.0x4000 -dram_end:0x45f -bdata:0x60.0x45f -dhwstk_size:30 -beeprom:0.512 -fihx_coff -S2 @MAIN.lk   -lcatmega
Device 15% full.
Done. Thu Nov 08 02:14:50 2012
我明明在前面已经加了头文件
#include "ioconfig.h"
#include "datacomm.h"
#include "pwm.h"
#include "itoa.h"
#include "uart.h"
#include "lcd1602.h"
#include "ds18b20.h"
#include "delay.h"

itoa.h头文件如下
#ifndef _itoa_H__
#define _itoa_H__
unsigned char*tochar(unsigned int num,unsigned char*str);
unsigned char*settochar(unsigned char num,unsigned char*str);
#endif
为什么还有函数未声明的警告?

yklstudent 发表于 2012-11-8 07:41:41

!W F:\ICCAVR\温控2\temrun.c(128): calling a function without prototype may cause runtime errors if the function
does not return int or unsigned int

lusson 发表于 2012-11-8 08:23:43

不一定是函数未声明
把程序放上来是王道

gdutayj 发表于 2012-11-8 17:54:41

lusson 发表于 2012-11-8 08:23 static/image/common/back.gif
不一定是函数未声明
把程序放上来是王道

都放上来,那如果函数很多的话,不是很多很乱吗?

gdutayj 发表于 2012-11-12 22:09:15

发现编译两次,就没有这样的问题了,我同学说是编译次序的问题
页: [1]
查看完整版本: icc编译出现calling a function without prototype问题?