This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Help with gcc 4.2


The problem is that i got these warnings of C99 inline and Cast and i
don't know exactly what is wrong ...

What would cause the Cast warning?

To explain better what's my scenario i use Asterisk to replace PABXs
and i use a Card of Digivoice (www.digivoice.com.br) to connect E1s
(like T1 in USA) and the digital network (Softphones, Analog
telephones Adapters and whatelse i need).
I got the problem when compiling the drivers of Digivoice within a
specific scenario: Ubuntu 8.04.2 Kernel: 2.6.24-19-server (and yet
other versions) with GCC 4.2.4.
I did the same at other scenario for example: Ubuntu 8.10 with Kernel
version 2.6.27-7-server and GCC 4.3.2 and had success.

I tried to remake the machines lots of times, reinstalling the hole system, etc.

The worst is that i have 2 similar Machines with little differences.
The first doesn't give me problems, the second gives the warnings,
look:

MACHINE 1
root@ipbx-ind-paralela:/home/diogo# uname -a
Linux ipbx-ind-paralela 2.6.24-19-server #1 SMP Wed Aug 20 18:43:06
UTC 2008 x86_64 GNU/Linux

root@ipbx-ind-paralela:/home/diogo# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: ? ?Ubuntu 8.04.2
Release: ? ? ? ?8.04
Codename: ? ? ? hardy

root@ipbx-ind-paralela:/home/diogo# gcc --version
gcc (GCC) 4.2.4 (Ubuntu 4.2.4-1ubuntu3)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. ?There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


MACHINE 2
root@ubuntu-8:/usr/src/dgvchannel-1.0.3# uname -a
Linux ubuntu-8.04.1 2.6.24-19-server #1 SMP Wed Jun 18 14:44:47 UTC
2008 x86_64 GNU/Linux

root@ubuntu-8:/usr/src/dgvchannel-1.0.3# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: ? ?Ubuntu 8.04.1
Release: ? ? ? ?8.04
Codename: ? ? ? hardy

root@ubuntu-8:/usr/src/dgvchannel-1.0.3# gcc --version
gcc (GCC) 4.2.4 (Ubuntu 4.2.4-1ubuntu4)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. ?There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


In Machine 1 i have an earlier version of the same Kernel. I have yet
another package of instalation for GCC ?(Ubuntu 4.2.4-1ubuntu3) In
Machine 2 i put an earlier distribution of Ubuntu to check if wasn't
something specific about the repositories for 8.04.2.


Thanks,


Diogo

2009/7/2 Andrew Haley <aph@redhat.com>:
> Diogo Barbosa wrote:
>> ---------- Forwarded message ----------
>> From: Diogo Barbosa <diogo@smartvox.inf.br>
>> Date: 2009/7/1
>> Subject: Fwd: Help with gcc 4.2
>> To: gcc-help@gcc.gnu.org
>>
>>
>> Hi People,
>>
>>
>> I got these Warnings shown downlines and read something at
>> http://gcc.gnu.org/ml/gcc-patches/2007-03/msg00702.html about the GCC
>> inline problem.
>>
>> I am using Ubuntu 8.04 LTS and i am having problems with compilation
>> of a package (http://downloads.digivoice.com.br/pub/dgvchannel/stable/dgvchannel-1.0.3.tar.gz)
>> Please look at the log:
>>
>> root@ipbx-indiana:/usr/src/dgvchannel-1.0.3# make
>> ./create_config.sh "/usr/src/asterisk/include"
>> 4103
>> Checking Asterisk version at /usr/src/asterisk/include/asterisk... 1.4.24.1
>> ?* assuming Asterisk version 1.4
>> ?* found stringfield in ast_channel
>> ?* found 'indicate' with data
>> ?* found second extended ast_channel_alloc
>> ?* found clear flag HAS_TIMING_INFO in ast_channel
>> ?* found extended ast_channel_alloc
>> ?* found send_digit_end with duration
>> config.h complete.
>> gcc -std=gnu99 -pipe -fPIC -Wall -Wmissing-prototypes
>> -Wmissing-declarations ?-I/usr/src/asterisk/include -D_REENTRANT
>> -D_GNU_SOURCE -D__LINUX__ ? ?-c -o chan_dgv.o chan_dgv.c
>> In file included from chan_dgv.c:81:
>> /usr/src/asterisk/include/asterisk/lock.h:1155: warning: C99 inline
>> functions are not supported; using GNU89
>> /usr/src/asterisk/include/asterisk/lock.h:1155: warning: to disable
>> this warning use -fgnu89-inline or the gnu_inline function attribute
>> /usr/src/asterisk/include/asterisk/lock.h:1201: warning: C99 inline
>> functions are not supported; using GNU89
>> In file included from /usr/src/asterisk/include/asterisk/utils.h:39,
>> ? ? ? ? ? ? ? ? ?from chan_dgv.c:82:
>> /usr/src/asterisk/include/asterisk/time.h:44: warning: C99 inline
>> functions are not supported; using GNU89
>> /usr/src/asterisk/include/asterisk/time.h:60: warning: C99 inline
>> functions are not supported; using GNU89
>> /usr/src/asterisk/include/asterisk/time.h:71: warning: C99 inline
>> functions are not supported; using GNU89
>> /usr/src/asterisk/include/asterisk/time.h:90: warning: C99 inline
>> functions are not supported; using GNU89
>> /usr/src/asterisk/include/asterisk/time.h:100: warning: C99 inline
>> functions are not supported; using GNU89
>> /usr/src/asterisk/include/asterisk/time.h:122: warning: C99 inline
>> functions are not supported; using GNU89
>> /usr/src/asterisk/include/asterisk/time.h:137: warning: C99 inline
>> functions are not supported; using GNU89
>> In file included from /usr/src/asterisk/include/asterisk/utils.h:40,
>> ? ? ? ? ? ? ? ? ?from chan_dgv.c:82:
>> /usr/src/asterisk/include/asterisk/strings.h:51: warning: C99 inline
>> functions are not supported; using GNU89
>> /usr/src/asterisk/include/asterisk/strings.h:66: warning: C99 inline
>> functions are not supported; using GNU89
>> /usr/src/asterisk/include/asterisk/strings.h:92: warning: C99 inline
>> functions are not supported; using GNU89
>> /usr/src/asterisk/include/asterisk/strings.h:110: warning: C99 inline
>> functions are not supported; using GNU89
>> /usr/src/asterisk/include/asterisk/strings.h:169: warning: C99 inline
>> functions are not supported; using GNU89
>> In file included from chan_dgv.c:82:
>> /usr/src/asterisk/include/asterisk/utils.h:335: warning: C99 inline
>> functions are not supported; using GNU89
>> /usr/src/asterisk/include/asterisk/utils.h:358: warning: C99 inline
>> functions are not supported; using GNU89
>> /usr/src/asterisk/include/asterisk/utils.h:394: warning: C99 inline
>> functions are not supported; using GNU89
>> /usr/src/asterisk/include/asterisk/utils.h:421: warning: C99 inline
>> functions are not supported; using GNU89
>> /usr/src/asterisk/include/asterisk/utils.h:450: warning: C99 inline
>> functions are not supported; using GNU89
>> /usr/src/asterisk/include/asterisk/utils.h:488: warning: C99 inline
>> functions are not supported; using GNU89
>> chan_dgv.c: In function ‘pri_event_handle’:
>> chan_dgv.c:4079: warning: cast from pointer to integer of different size
>> chan_dgv.c: In function ‘dgv_new’:
>> chan_dgv.c:11087: warning: cast from pointer to integer of different size
>>
>>
>> root@ipbx-indiana:/usr/src/dgvchannel-1.0.3# uname -a
>> Linux ipbx-indiana 2.6.24-23-server #1 SMP Wed Apr 1 22:14:30 UTC 2009
>> x86_64 GNU/Linux
>>
>> root@ipbx-indiana:/usr/src/dgvchannel-1.0.3# gcc --version
>> gcc (GCC) 4.2.4 (Ubuntu 4.2.4-1ubuntu4)
>> Copyright (C) 2007 Free Software Foundation, Inc.
>> This is free software; see the source for copying conditions. ?There is NO
>> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>>
>>
>> I tried to take the -std=gnu99 and did not work as it should.
>> The worst is that i have a machine with same version of Ubuntu and GCC
>> that compile it properly?!?!!
>
> What exactly is the problem? ?All I see here are a few warnings.
>
> I would look closely at the "cast from pointer to integer of different size"
> warnings, since these are probably real bugs.
>
> Andrew.
>
>



--
Atenciosamente,

Diogo Rocha
Suporte - Smart Vox
Mail: diogo@smartvox.inf.br
?+55 71 21050568



-- 
Atenciosamente,

Diogo Rocha
Suporte - Smart Vox
Mail: diogo@smartvox.inf.br
 +55 71 21050568


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]