]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
compiler: Use backend interface for function declarations.
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
0a6c2227
TT
12013-09-25 Tom Tromey <tromey@redhat.com>
2
3 * Make-lang.in (c/gccspec.o): Remove.
4 (CFLAGS-c/gccspec.o): New variable.
5 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
6 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
7 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
8
f3bc55f0
TT
92013-09-25 Tom Tromey <tromey@redhat.com>
10
11 * Make-lang.in (c/gccspec.o): Don't use subshell.
12
a24d975c
MP
132013-09-18 Marek Polacek <polacek@redhat.com>
14
15 PR sanitize/58443
16 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
17 Remove unnecessary check.
18
ce6923c5
MP
192013-09-18 Marek Polacek <polacek@redhat.com>
20
21 PR sanitizer/58411
22 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
23 no_sanitize_undefined attribute.
24
a1e51df9
KT
252013-09-13 Kai Tietz <ktietz@redhat.com>
26
27 PR target/57848
28 * c-decl.c (c_builtin_function_ext_scope): Remove
29 wrong assumption that it is never called on prexisting
30 symbol.
31
0af94e6f
JR
322013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
33
34 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
35
20059c8b
GDR
362013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
37
38 * c-objc-common.c (c_tree_printer): Tidy.
39
de5a5fa1
MP
402013-08-30 Marek Polacek <polacek@redhat.com>
41
42 * c-typeck.c (build_binary_op): Add division by zero and shift
43 instrumentation.
44
2531a1d9 452013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 46 Joseph Myers <joseph@codesourcery.com>
2531a1d9 47
6e2bcc98 48 PR c/35649
2531a1d9
JR
49 * c-typeck.c (c_common_type): Prefer double_type_node over
50 other REAL_TYPE types with the same precision.
51 (convert_arguments): Likewise.
52
025311c4
GDR
532013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
54
55 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
56 (c_initialize_diagnostics): Call a destructor for the early printer.
57
da6ca2b5
GDR
582013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
59
60 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
61 printer initialization.
62
318cda85 632013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 64
318cda85
BI
65 PR c/57490
66 * c-array-notation.c (fix_conditional_array_notations_1): Added a
67 check for truth values.
68 (expand_array_notation_exprs): Added truth values case. Removed an
69 unwanted else. Added for-loop to walk through subtrees in default
70 case.
71
b066401f
GDR
722013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
73
74 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
75
fb48aadc
JM
762013-07-23 Joseph Myers <joseph@codesourcery.com>
77
78 * c-parser.c (struct c_generic_association): Fix typo.
79
433cc7b0
TT
802013-07-23 Tom Tromey <tromey@redhat.com>
81 Joseph Myers <joseph@codesourcery.com>
82
83 * c-parser.c (struct c_generic_association): New.
84 (c_generic_association_d): New typedef.
85 (c_parser_generic_selection): New function.
86 (c_parser_postfix_expression): Handle RID_GENERIC.
87
26d40c3d
JM
882013-07-13 Jason Merrill <jason@redhat.com>
89
90 PR c++/57793
91 * c-decl.c (finish_struct): Check for too-large class.
92
40d3d530
JR
932013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
94
95 PR c/57821
96 * c-typeck.c (set_init_index): When folding, check for index overflow.
97
1141ed3f
BI
982013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
99
100 * c-parser.c (c_parser_array_notation): Removed rejection of array
101 notations in an array of function pointers.
102
713b46fa
BI
1032013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
104
105 * c-array-notation.c (make_triplet_val_inv): New function.
106 (create_cmp_incr): Likewise.
107 (create_array_refs): Likewise.
108 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
109 Also modularized common parts between functions and called the function.
110 (build_array_notation_expr): Likewise.
111 (fix_conditional_array_notations_1): Likewise.
112 (fix_array_notation_expr): Likewise.
113 (fix_array_notation_call_expr): Likewise.
114
92f20202
MP
1152013-06-18 Marek Polacek <polacek@redhat.com>
116
117 PR c/57630
118 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
119
73a23b06
BI
1202013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
121
122 * c-array-notation.c (build_array_notation_expr): Reject array notation
123 mismatch between LHS and RHS even inside a call_expr. Also, removed
124 a couple while statements that were dead code.
125
00b8517d
BI
1262013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
127
128 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
129 excessive precision expressions in function parameters. Also removed
130 couple unwanted while statements.
131
1509bdda
BI
1322013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
133
134 * c-array-notation.c (expand_array_notation_exprs): Added
135 ARRAY_NOTATION_REF case.
136
d60f1706
BI
1372013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
138
139 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
140 function to c-family/array-notation-common.c.
141 (is_cilkplus_reduce_builtin): Likewise.
142 (find_rank): Likewise.
143 (extract_array_notation_exprs): Likewise.
144 (replace_array_notations): Likewise.
145 (find_inv_trees): Likewise.
146 (replace_inv_trees): Likewise.
147 (contains_array_notation_expr): Likewise.
148 (find_correct_array_notation_type): Likewise.
149 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
150 (struct inv_list): Moved this to c-family/array-notation-common.c.
151 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
152
6d6efbb3
BI
1532013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
154
155 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
156 reduction functions outside the for-loop. Added a check if the fundecl
157 is non-NULL. Finally, removed an unwanted if-statement, and made the
158 body unconditional.
159
25c22937
BI
1602013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
161
162 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
163 condition of the if-statement matches the rank of else-block and then-
164 block when array notations are used.
165 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
166 expression after the entire function body is parsed.
167 (c_parser_expr_no_commas): Delayed creating array notation expressions
168 to the end of function parsing.
169 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
170 whole if-statement instead of just the condition.
171 (expand_array_notation_exprs): Added MODIFY_EXPR case.
172
edd25645
BI
1732013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
174
175 PR c/57474
176 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
177 array to NULL_TREE if they are unused. Also added a check for the
178 field to be NULL before its fields are used in future.
179
065ce7f1
RO
1802013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
181
182 PR bootstrap/57450
183 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
184 (build_array_notation_expr): Likewise.
185
36536d79
BI
1862013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
187
188 * c-typeck.c (build_array_ref): Added a check to see if array's
189 index is greater than one. If true, then emit an error.
190 (build_function_call_vec): Exclude error reporting and checking
191 for builtin array-notation functions.
192 (convert_arguments): Likewise.
193 (c_finish_return): Added a check for array notations as a return
194 expression. If true, then emit an error.
195 (c_finish_loop): Added a check for array notations in a loop
196 condition. If true then emit an error.
197 (lvalue_p): Added a ARRAY_NOTATION_REF case.
198 (build_binary_op): Added a check for array notation expr inside
199 op1 and op0. If present, we call another function to find correct
200 type.
201 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
202 * c-parser.c (c_parser_compound_statement): Check if array
203 notation code is used in tree, if so, then transform them into
204 appropriate C code.
205 (c_parser_expr_no_commas): Check if array notation is used in LHS
206 or RHS, if so, then build array notation expression instead of
207 regular modify.
208 (c_parser_postfix_expression_after_primary): Added a check for
209 colon(s) after square braces, if so then handle it like an array
210 notation. Also, break up array notations in unary op if found.
211 (c_parser_direct_declarator_inner): Added a check for array
212 notation.
213 (c_parser_compound_statement): Added a check for array notation in
214 a stmt. If one is present, then expand array notation expr.
215 (c_parser_if_statement): Likewise.
216 (c_parser_switch_statement): Added a check for array notations in
217 a switch statement's condition. If true, then output an error.
218 (c_parser_while_statement): Similarly, but for a while.
219 (c_parser_do_statement): Similarly, but for a do-while.
220 (c_parser_for_statement): Similarly, but for a for-loop.
221 (c_parser_unary_expression): Check if array notation is used in a
222 pre-increment or pre-decrement expression. If true, then expand
223 them.
224 (c_parser_array_notation): New function.
225 * c-array-notation.c: New file.
226 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
227
cd192ccc
MS
2282013-05-23 Mike Stump <mikestump@comcast.net>
229
230 * c-typeck.c (convert_for_assignment): Handle references to memory
231 spaces better.
232
427b248d
JM
2332013-05-16 Jason Merrill <jason@redhat.com>
234
235 * Make-lang.in (cc1$(exeext)): Use link mutex.
236
44d90fe1
PC
2372013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
238
239 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
240 to simply use OPT_Wpointer_arith.
241 (build_unary_op): Likewise.
242
4e7d7b3d
JJ
2432013-04-03 Jakub Jelinek <jakub@redhat.com>
244
245 PR c/19449
246 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
247 argument. If set, or it temporarily for parsing of the first
248 argument into force_folding_builtin_constant_p.
249 (c_parser_postfix_expression): Adjust callers.
250
839b422f
RB
2512013-03-21 Richard Biener <rguenther@suse.de>
252
253 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
254 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
255
2ee028f1
MP
2562013-02-12 Marek Polacek <polacek@redhat.com>
257
258 PR c/44938
259 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
260 origtypes to NULL.
261
8824edff
JJ
2622013-01-24 Jakub Jelinek <jakub@redhat.com>
263
264 PR c/56078
265 * c-typeck.c (set_nonincremental_init_from_string): If
266 constructor_max_index is NULL, treat it as if tree_int_cst_lt
267 returned false.
268 (process_init_element): Likewise.
269
eadd3d0d
JJ
2702012-12-20 Jakub Jelinek <jakub@redhat.com>
271
272 PR c++/55619
273 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
274 argument, don't call default_function_array_conversion
275 nor c_fully_fold here.
276 (c_parser_asm_statement): Adjust callers.
277 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
278 and outputs here, and call default_function_array_conversion
279 on inputs that don't need to be addressable.
280
f8a93a2e
JJ
2812012-12-18 Jakub Jelinek <jakub@redhat.com>
282
283 PR c/39464
284 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
285 warning require that both c_common_unsigned_type as well as
286 c_common_signed_type is the same for both mvl and mvr types.
287
9771b263
DN
2882012-11-16 Diego Novillo <dnovillo@google.com>
289
290 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
291
292 * c-common.c: Use new vec API in vec.h.
293 * c-common.h: Likewise.
294 * c-gimplify.c: Likewise.
295 * c-pragma.c: Likewise.
296 * c-pretty-print.c: Likewise.
297 * c-pretty-print.h: Likewise.
298 * c-semantics.c: Likewise.
299 * c-decl.c: Likewise.
300 * c-parser.c: Likewise.
301 * c-tree.h: Likewise.
302 * c-typeck.c: Likewise.
303
880661a4
JW
3042012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
305
306 PR c++/54930
307 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
308
077d1abe
MLI
3092012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
310
311 PR c/53066
312 * c-decl.c (warn_if_shadowing): Do not warn if a variable
313 shadows a function, unless the variable is a function or a
314 pointer-to-function.
315
3a785c97
JJ
3162012-10-12 Jakub Jelinek <jakub@redhat.com>
317
318 PR c/54381
319 * c-parser.c (struct c_tree_loc_pair): Removed.
320 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
321 add location_t * and tree * arguments, fill in array of 3
322 sizeof_arg trees and corresponding locs.
323 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
324 c_parser_expr_list callers.
325 (c_parser_postfix_expression_after_primary): Likewise. Pass
326 array of 3 sizeof_arg trees and locs (corresponding to first
327 3 arguments) to sizeof_pointer_memaccess_warning.
328
703c8606
LC
3292012-10-09 Lawrence Crowl <crowl@google.com>
330
331 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
332 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
333 hash table.
334
5d9de0d0
PC
3352012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
336
337 PR c++/54194
338 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
339 call.
340
a212e43f
MG
3412012-10-09 Marc Glisse <marc.glisse@inria.fr>
342
343 PR c++/54427
344 * c-typeck.c: Include c-common.h.
345 (enum stv_conv): Moved to c-common.h.
346 (scalar_to_vector): Moved to c-common.c.
347 (build_binary_op): Adapt to scalar_to_vector's new prototype.
348 * Make-lang.in: c-typeck.c depends on c-common.h.
349
3b78de56
AC
3502012-10-04 Arnaud Charlet <charlet@adacore.com>
351
352 * c-decl.c (c_write_global_declarations): Fix handling of
353 -fdump-ada-spec*.
354
78c60e3d
SS
3552012-09-30 Sharad Singhai <singhai@google.com>
356
357 * c-decl.c (c_write_global_declarations): Use a different method
358 to determine if the dump has ben initialized.
359
9f33203d
JM
3602012-09-14 Joseph Myers <joseph@codesourcery.com>
361
362 PR c/54552
363 * c-typeck.c (c_cast_expr): When casting to a type requiring
364 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
365 c_fully_fold first.
366
a27d595d
JM
3672012-09-14 Joseph Myers <joseph@codesourcery.com>
368
369 PR c/54103
370 * c-typeck.c (build_unary_op): Pass original argument of
371 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
372 any C_MAYBE_CONST_EXPR, if it has integer operands.
373 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
374 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
375 to c_objc_common_truthvalue_conversion, then remove any
376 C_MAYBE_CONST_EXPR, if they have integer operands. Use
377 c_objc_common_truthvalue_conversion not
378 c_common_truthvalue_conversion.
379 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
380 call note_integer_operands for arguments with integer operands
381 that are not integer constants.
382
9feb29df
JJ
3832012-09-13 Jakub Jelinek <jakub@redhat.com>
384
385 PR c/54559
386 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
387 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
388
d409320c
JJ
3892012-08-31 Jakub Jelinek <jakub@redhat.com>
390
391 PR c/54428
392 * c-convert.c (convert): Don't call fold_convert_loc if
393 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
394 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
395 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
396
6265d07c
JJ
3972012-08-24 Jakub Jelinek <jakub@redhat.com>
398
399 PR c/54355
400 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
401 for nested and empty_ok arguments in the call to
402 c_parser_declaration_or_fndef.
403
1a4049e7
JJ
4042012-08-17 Jakub Jelinek <jakub@redhat.com>
405
406 * c-tree.h (c_last_sizeof_arg): Declare.
407 * c-parser.c (struct c_tree_loc_pair): New type.
408 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
409 non-NULL.
410 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
411 (c_parser_postfix_expression_after_primary): Likewise. Call
412 sizeof_pointer_memaccess_warning if needed.
413 (sizeof_ptr_memacc_comptypes): New function.
414 * c-typeck.c (c_last_sizeof_arg): New global variable.
415 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
416
0229aee9
UB
4172012-07-24 Uros Bizjak <ubizjak@gmail.com>
418
419 * c-lang.h (lang_decl): Add variable_size GTY option.
420
7ee2468b
SB
4212012-07-16 Steven Bosscher <steven@gcc.gnu.org>
422
423 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
424 * Make-lang.in: Fix dependencies.
425
d4a10d0a
SB
4262012-06-29 Steven Bosscher <steven@gcc.gnu.org>
427
428 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
429 and add language Makefile hooks.
430 * config-lang.in: New file.
431 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
432 add the required "normal" config-lang.in rules.
433 * c-lang.h: Moved from gcc/ to here.
434 * c-tree.h: Likewise.
435 * c-objc-common.c: Likewise.
436 * c-objc-common.h: Likewise.
437 * c-typeck.c: Likewise.
438 * c-convert.c: Likewise.
439 * c-lang.c: Likewise.
440 * c-aux-info.c: Likewise.
441 * c-errors.c: Likewise.
442 * gccspec.c: Likewise.
443 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
444 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
445\f
d1e082c2 446Copyright (C) 2012-2013 Free Software Foundation, Inc.
d4a10d0a
SB
447
448Copying and distribution of this file, with or without modification,
449are permitted in any medium without royalty provided the copyright
450notice and this notice are preserved.