Bug 692129 - Incorrect strchr/strrchr/strchrnul prototype
Summary: Incorrect strchr/strrchr/strchrnul prototype
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: glibc
Version: 6.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Andreas Schwab
QA Contact: qe-baseos-tools-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-30 13:43 UTC by H.J. Lu
Modified: 2016-11-24 16:05 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-03-30 14:02:18 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Sourceware 12622 0 None None None Never

Description H.J. Lu 2011-03-30 13:43:39 UTC
This is a regression from EL4 and EL5:

[hjl@gnu-4 tmp]$ cat x.c
#include <string.h>

char *foo(const char *filename) {
  char *splitpos;

  splitpos = strrchr(filename, '/');
  return splitpos;
}
[hjl@gnu-4 tmp]$ g++ x.c
x.c: In function \u2018char* foo(const char*)\u2019:
x.c:6:35: error: invalid conversion from \u2018const char*\u2019 to
\u2018char*\u2019
[hjl@gnu-4 tmp]$

Comment 1 Andreas Schwab 2011-03-30 14:02:18 UTC
As required by the C++ standard.


Note You need to log in before you can comment on or make changes to this bug.