This is the mail archive of the gcc-bugs@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]

[Bug c/16666] New: 3.4.x regression compared to 3.3.x.


	A simple test case below triggers the bug. GCC calls
        diagnose_mismatched_decls before it parses K&R parameter definitions
	in second dremf occurence and this effectively causes comparison of

	float dremf(float, float);	// takes two floats
	float fremf();			// takes unspecified number of args

	prototypes, causing a bogus error message.

% gcc34 -c builtin.c                                                            
dremf.c:5: error: conflicting types for 'dremf'                               
dremf.c:5: error: conflicting types for 'dremf'                               

	This is a regression from previous GCC releases.

Environment:
System: FreeBSD k8.dnsalias.net 5.2-CURRENT FreeBSD 5.2-CURRENT #0: Mon Jul 12 00:28:33 EDT 2004 kan@k8.dnsalias.net:/usr/src/sys/amd64/compile/KAN amd64


	<machine, os, target, libraries (multiple lines)>
host: x86_64-portbld-freebsd5.2
build: x86_64-portbld-freebsd5.2
target: x86_64-portbld-freebsd5.2
configured with: ./..//gcc-3.4-20040709/configure --disable-nls --with-system-zlib --with-libiconv-prefix=/usr/local --program-suffix=34 --with-gxx-include-dir=/usr/local/lib/gcc/x86_64-portbld-freebsd5.2/3.4.2/include/c++/ --disable-shared --disable-libgcj --prefix=/usr/local x86_64-portbld-freebsd5.2

How-To-Repeat:

% cat dremf.c

float dremf(float, float);

float
dremf(x, y)
        float x, y;
{
	return x+y;
}

% gcc34 -c dremf.c
dremf.c:5: error: conflicting types for 'dremf'
dremf.c:5: error: conflicting types for 'dremf'
------- Additional Comments From kan at FreeBSD dot ORG  2004-07-22 02:53 -------
Fix:
	Unfortunately, I have no patch for this.

-- 
           Summary: 3.4.x regression compared to 3.3.x.
           Product: gcc
           Version: 3.4.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: kan at FreeBSD dot ORG
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: x86_64-portbld-freebsd5.2
  GCC host triplet: x86_64-portbld-freebsd5.2
GCC target triplet: x86_64-portbld-freebsd5.2


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16666


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