]> gcc.gnu.org Git - gcc.git/blame - gcc/c/ChangeLog
genmatch.c (simplify::for_subst_vec): New member.
[gcc.git] / gcc / c / ChangeLog
CommitLineData
992118a1
PP
12015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
2
3 * c-parser.c (c_parser_if_body): Take token_indent_info
4 argument. Call warn_for_misleading_indentation even when the
5 body is a semicolon. Extract token_indent_infos corresponding
6 to the guard, body and next tokens. Adjust call to
7 warn_for_misleading_indentation accordingly.
8 (c_parser_else_body): Likewise.
9 (c_parser_if_statement): Likewise.
10 (c_parser_while_statement): Likewise.
11 (c_parser_for_statement): Likewise.
12
46308474
LFSM
132015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
14 Manuel López-Ibáñez <manu@gcc.gnu.org>
15
16 * c-decl.c (get_parm_info): Remove static var. Update warning
17 message.
18
05b28fd6
MP
192015-07-27 Marek Polacek <polacek@redhat.com>
20
21 PR c++/66555
22 PR c/54979
23 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
24
451b5e48
MP
252015-07-20 Marek Polacek <polacek@redhat.com>
26
27 PR c++/55095
28 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
29 (build_binary_op): Warn about left shift overflows.
30
1916bcb5
AM
312015-07-09 Andrew MacLeod <amacleod@redhat.com>
32
33 * c-array-notation.c: Adjust includes for flags.h changes.
34 * c-objc-common.c: Likewise.
35
c7131fb2
AM
362015-07-07 Andrew MacLeod <amacleod@redhat.com>
37
38 * c-array-notation.c: Adjust includes.
39 * c-aux-info.c: Likewise.
40 * c-convert.c: Likewise.
41 * c-decl.c: Likewise.
42 * c-errors.c: Likewise.
43 * c-lang.c: Likewise.
44 * c-objc-common.c: Likewise.
45 * c-parser.c: Likewise.
46 * c-typeck.c: Likewise.
47
da2e71c9
MLI
482015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
49
50 PR fortran/66605
51 * c-decl.c (finish_function): Call do_warn_unused_parameter.
52
b155cfd9
MP
532015-06-29 Marek Polacek <polacek@redhat.com>
54
55 PR c/66322
56 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
57 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
58 about -Wswitch-bool here.
59 (do_case): Update c_add_case_label call.
60 (c_finish_case): Update c_do_switch_warnings call.
61
31521951
MP
622015-06-27 Marek Polacek <polacek@redhat.com>
63
64 * c-typeck.c: Use VECTOR_TYPE_P throughout.
65
22d03525
MP
662015-06-26 Marek Polacek <polacek@redhat.com>
67
68 * c-array-notation.c (fix_builtin_array_notation_fn): Use
69 INDIRECT_REF_P.
70 * c-typeck.c (array_to_pointer_conversion): Likewise.
71 (build_unary_op): Likewise.
72 (c_finish_return): Likewise.
73
f0889939
AM
742015-06-25 Andrew MacLeod <amacleod@redhat.com>
75
76 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
77 * c-parser.c: Likewise.
78
8d67ee55
RS
792015-06-25 Richard Sandiford <richard.sandiford@arm.com>
80
81 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
82 instead of pointer_hash.
83 (detect_field_duplicates): Likewise.
84
0ae9bd27
MP
852015-06-25 Marek Polacek <polacek@redhat.com>
86
87 * c-array-notation.c: Use VAR_P throughout.
88 * c-decl.c: Likewise.
89 * c-objc-common.c: Likewise.
90 * c-parser.c: Likewise.
91 * c-typeck.c: Likewise.
92
62f9079a
MP
932015-06-25 Marek Polacek <polacek@redhat.com>
94
95 * c-decl.c: Use is_global_var throughout.
96 * c-parser.c: Likewise.
97 * c-typeck.c: Likewise.
98
abb226c9
AM
992015-06-17 Andrew MacLeod <amacleod@redhat.com>
100
101 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
102 * c-aux-info.c: Likewise.
103 * c-convert.c: Likewise.
104 * c-decl.c: Likewise.
105 * c-errors.c: Likewise.
106 * c-lang.c: Likewise.
107 * c-objc-common.c: Likewise.
108 * c-parser.c: Likewise.
109 * c-typeck.c: Likewise.
110
8cbababc
JH
1112015-06-11 Jan Hubicka <hubicka@ucw.cz>
112
113 PR middle-end/66325
114 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
115 variants.
116
a0349665
PMR
1172015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
118
119 * c-decl.c (pop_scope): Register the main translation unit
120 through the new debug hook.
121
13fdf2e2
AM
1222015-06-08 Andrew MacLeod <amacleod@redhat.com>
123
124 * c-array-notation.c : Adjust include files.
125 * c-aux-info.c : Likewise.
126 * c-convert.c : Likewise.
127 * c-decl.c : Likewise.
128 * c-errors.c : Likewise.
129 * c-lang.c : Likewise.
130 * c-lang.h : Likewise.
131 * c-objc-common.c : Likewise.
132 * c-parser.c : Likewise.
133 * c-typeck.c : Likewise.
134
d7438551
AH
1352015-06-05 Aldy Hernandez <aldyh@redhat.com>
136
137 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
138 immediately clobber it.
139 (c_write_global_declarations_1): Remove call to
140 check_global_declaration_1.
141 (c_write_global_declarations_2): Remove.
142 (c_write_final_cleanups): Rename from c_write_global_declarations.
143 Remove call to finalize_compilation_unit.
144 Remove calls to debugging hooks.
145 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
146 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
147 * c-tree.h: Remove c_write_global_declarations.
148
ecb9f223
AM
1492015-06-04 Andrew MacLeod <amacleod@redhat.com>
150
151 * c-array-notation.c: Adjust includes for restructured coretypes.h.
152 * c-aux-info.c: Likewise.
153 * c-convert.c: Likewise.
154 * c-decl.c: Likewise.
155 * c-errors.c: Likewise.
156 * c-lang.c: Likewise.
157 * c-objc-common.c: Likewise.
158 * c-parser.c: Likewise.
159 * c-typeck.c: Likewise.
160
9482b620
MP
1612015-06-04 Marek Polacek <polacek@redhat.com>
162
163 PR c/66341
164 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
165 it is a lvalue.
166
bc51ace3
PK
1672015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
168
169 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
170 Warn for empty struct.
171 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
172
ea5b45b6
AT
1732015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
174
175 * c-decl.c (start_function): Call plugin before parsing.
176 (finish_function): Call plugin after parsing.
177
c2d47482
PK
1782015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
179
180 PR c/49551
181 * c-decl.c (merge_decls): Merge DECL_COMMON.
182
a95492ab
JW
1832015-05-22 Jim Wilson <jim.wilson@linaro.org>
184
185 * Make-lang.in (check_gcc_pallelize): Define.
186
fd5c817a
MP
1872015-05-22 Marek Polacek <polacek@redhat.com>
188
189 PR c/47043
190 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
191 attributes.
192
c7b70a3c
MP
1932015-05-21 Marek Polacek <polacek@redhat.com>
194
195 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
196 DECL_BUILT_IN.
197
21b634ae
MP
1982015-05-20 Marek Polacek <polacek@redhat.com>
199
200 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
201 * c-typeck.c: Likewise.
202
296a8c2f
MP
2032015-05-19 Marek Polacek <polacek@redhat.com>
204
205 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
206
41b37d5e
JJ
2072015-05-19 Jakub Jelinek <jakub@redhat.com>
208
209 PR middle-end/66199
210 * c-parser.c (c_parser_omp_for_loop): Don't add
211 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
212 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
213 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
214 constructs.
215
fab27f52
MM
2162015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
217
218 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 219 swaps.
fab27f52 220
40de31cf
MLI
2212015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
222
223 PR fortran/44054
224 * c-objc-common.c (c_tree_printer): Replace locus pointer with
225 accessor function.
226
3aa3c9fc
MP
2272015-05-14 Marek Polacek <polacek@redhat.com>
228
229 PR c/66066
230 PR c/66127
231 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
232 rather than with 0.
233
c3388e62
DM
2342015-05-12 David Malcolm <dmalcolm@redhat.com>
235
236 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
237 to add a call to warn_for_misleading_indentation.
238 (c_parser_else_body): Likewise, adding param "else_loc".
239 (c_parser_if_statement): Check for misleading indentation.
240 (c_parser_while_statement): Likewise.
241 (c_parser_for_statement): Likewise.
242
755e528f
MP
2432015-05-08 Marek Polacek <polacek@redhat.com>
244
245 PR c/64918
246 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
247 (output_init_element): Likewise.
248
0173bd2a
MP
2492015-05-07 Marek Polacek <polacek@redhat.com>
250
251 PR c/65179
252 * c-typeck.c (build_binary_op): Warn when left shifting a negative
253 value.
254
9babc352
MP
2552015-04-30 Marek Polacek <polacek@redhat.com>
256
257 * c-typeck.c (set_init_label): Call error_at instead of error and
258 pass LOC to it.
259
ac9f18db
MP
260 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
261 the type of a decl.
262
ec3fba51
MP
263 * c-typeck.c (c_build_va_arg): Clarify the error message.
264
b811915d
TS
2652015-04-29 Thomas Schwinge <thomas@codesourcery.com>
266
267 * c-parser.c (c_parser_oacc_enter_exit_data): Use
268 OMP_STANDALONE_CLAUSES.
269
f3075008
MP
2702015-04-28 Marek Polacek <polacek@redhat.com>
271
272 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
273
4e81b788
MP
2742015-04-28 Marek Polacek <polacek@redhat.com>
275
276 PR c/65901
277 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
278
6c1db78e
MP
2792015-04-25 Marek Polacek <polacek@redhat.com>
280
281 PR c/52085
282 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
283 attribute.
284
5c4abbb8
MP
2852015-04-23 Marek Polacek <polacek@redhat.com>
286
287 PR c/65345
288 * c-decl.c (set_labels_context_r): New function.
289 (store_parm_decls): Call it via walk_tree_without_duplicates.
290 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
291 instead of create_tmp_var. Build TARGET_EXPR instead of
292 COMPOUND_EXPR.
293 (build_atomic_assign): Use create_tmp_var_raw instead of
294 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
295
06aca1d5
IV
2962015-04-20 Ilya Verbin <ilya.verbin@intel.com>
297
298 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
299 (c_parser_omp_target_update): Add missed %> to error_at ().
300
8fba1830
BRF
3012015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
302
303 PR target/55143
304 * c-decl.c (c_default_pointer_mode): Remove definition.
305 * c-tree.h (c_default_pointer_mode): Remove declaration.
306
62021f64
TB
3072015-03-27 Tobias Burnus <burnus@net-b.de>
308
309 PR c/65586
310 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
311 error out.
312 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
313 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
314 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
315
9b65e171
JJ
3162015-03-19 Jakub Jelinek <jakub@redhat.com>
317
318 * c-decl.c (c_decl_attributes): Also add "omp declare target"
319 attribute for DECL_EXTERNAL VAR_DECLs.
320
17958621
JJ
3212015-03-11 Jakub Jelinek <jakub@redhat.com>
322
323 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
324 argument.
325
7ccb1a11
JJ
3262015-03-10 Jakub Jelinek <jakub@redhat.com>
327
328 PR c/65120
329 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
330 before preparing arguments to warn_logical_not_parentheses.
331
01177669
JJ
3322015-03-09 Jakub Jelinek <jakub@redhat.com>
333
334 PR c/65120
335 * c-typeck.c (parser_build_binary_op): Don't warn for
336 !!x == y or !b == y where b is _Bool.
337
802ac282
MP
3382015-03-09 Marek Polacek <polacek@redhat.com>
339
340 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
341 * c-decl.c (grokdeclarator): Likewise.
342 * c-typeck.c (build_binary_op): Likewise.
343
e5165b60
MP
3442015-02-27 Marek Polacek <polacek@redhat.com>
345
346 PR c/65228
347 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
348
065d214c
MP
3492015-02-14 Marek Polacek <polacek@redhat.com>
350
351 PR c/64768
352 * c-decl.c (grokdeclarator): Set the range of a flexible array member
353 declared through a typedef name.
354
e5d9235b
MP
3552015-02-13 Marek Polacek <polacek@redhat.com>
356
357 PR c/65050
358 * c-decl.c (grokdeclarator): Print also the type when giving
359 the error message about array's incomplete element type.
360
fa01ffcc
JJ
3612015-02-11 Jakub Jelinek <jakub@redhat.com>
362
363 PR c/64824
364 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
365 check in the POP macro.
366
c3e38a03
MP
3672015-02-09 Marek Polacek <polacek@redhat.com>
368
369 PR c/64856
370 * c-typeck.c (process_init_element): Don't always wrap
371 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
372 initializing a range of elements.
373
4886ec8e
JJ
3742015-02-04 Jakub Jelinek <jakub@redhat.com>
375
376 PR c/64824
377 PR c/64868
378 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
379
c3e38a03 3802015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
381
382 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
383 processing enum declaration.
384
7b33f0c8
MP
3852015-01-29 Marek Polacek <polacek@redhat.com>
386
387 PR c/64709
388 * c-typeck.c (pop_init_level): If constructor_elements has
389 exactly one element with integer_zerop value, set constructor_zeroinit
390 to 1. Remove braces around warning_init call.
391
dea63e49
JJ
3922015-01-27 Jakub Jelinek <jakub@redhat.com>
393
394 PR c/64766
395 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
396 of FUNCTION_DECLs with error_mark_node.
397
d38f7dce
JJ
3982015-01-26 Jakub Jelinek <jakub@redhat.com>
399
400 PR c/64778
401 * c-typeck.c (convert_arguments): Return -1 if there are
402 error_args, even if we've diagnosed too many arguments.
403
cbf5d0e7
RB
4042015-01-21 Richard Biener <rguenther@suse.de>
405
406 PR middle-end/64313
407 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
408 for builtins the user declared correctly.
409
41dbbb37
TS
4102015-01-15 Thomas Schwinge <thomas@codesourcery.com>
411 Bernd Schmidt <bernds@codesourcery.com>
412 Cesar Philippidis <cesar@codesourcery.com>
413 James Norris <jnorris@codesourcery.com>
414 Jakub Jelinek <jakub@redhat.com>
415 Ilmir Usmanov <i.usmanov@samsung.com>
416
417 * c-parser.c: Include "gomp-constants.h".
418 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
419 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
420 Use OMP_CLAUSE_SET_MAP_KIND.
421 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
422 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
423 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
424 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
425 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
426 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
427 "copyout", "create", "delete", "deviceptr", "gang", "host",
428 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
429 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
430 "present_or_create", "pcreate", "seq", "self", "vector",
431 "vector_length", "wait", "worker".
432 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
433 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
434 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
435 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
436 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
437 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
438 (c_parser_oacc_data_clause_deviceptr)
439 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
440 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
441 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
442 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
443 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
444 (c_parser_oacc_parallel, c_parser_oacc_update)
445 (c_parser_oacc_wait): New functions.
446 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
447 (c_finish_oacc_data): New prototypes.
448 * c-typeck.c: Include "gomp-constants.h".
449 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
450 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
451 OMP_CLAUSE_SET_MAP_KIND.
452 (c_finish_oacc_parallel, c_finish_oacc_kernels)
453 (c_finish_oacc_data): New functions.
454 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
455 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
456 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
457 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
458 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
459 GOMP_MAP_FORCE_DEVICEPTR.
460
adfac8df
JJ
4612015-01-09 Michael Collison <michael.collison@linaro.org>
462
463 * c-array-notation.c: Include hash-set.h, machmode.h,
464 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
465 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
466 * c-aux-info.c: Ditto.
467 * c-convert.c: Ditto.
468 * c-decl.c: Ditto.
469 * c-errors.c: Ditto.
470 * c-lang.c: Dittoxs.
471 * c-objc-common.c: Ditto.
472 * c-parser.c: Ditto.
473 * c-typeck.c: Include hash-set.h, machmode.h,
474 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
475 fold-const.h, wide-int.h, inchash.h, real.h and
476 fixed-value.h due to flattening of tree.h.
477
2cc901dc
MP
4782015-01-07 Marek Polacek <polacek@redhat.com>
479
480 PR c/64417
481 * c-typeck.c (process_init_element): Disallow initialization of
482 a flexible array member with a string constant if the structure
483 is in an array.
484
5624e564
JJ
4852015-01-05 Jakub Jelinek <jakub@redhat.com>
486
e5341100
JJ
487 PR sanitizer/64344
488 * c-typeck.c (convert_for_assignment, c_finish_return): For
489 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
490 types also set in_late_binary_op around convert call.
491 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
492 to integral type casts, if not in_late_binary_op, pass c_fully_fold
493 result on expr as last argument to ubsan_instrument_float_cast,
494 if in_late_binary_op, don't use c_save_expr but save_expr.
495
5624e564
JJ
496 Update copyright years.
497
5bd012f8
MP
4982015-01-05 Marek Polacek <polacek@redhat.com>
499
500 PR c/64423
501 * c-typeck.c (build_array_ref): Pass loc down to
502 warn_array_subscript_with_type_char.
503
768952be
MU
5042014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
505
506 * c-typeck.c: New behavious for pointers to arrays with qualifiers
507 (common-pointer-type): For pointers to arrays take qualifiers from
508 element type.
509 (build_conditional_expr): Add warnings for lost qualifiers.
510 (comp-target-types): Allow pointers to arrays with different qualifiers.
511 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
512 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
513 to PEDWARN_FOR_QUALIFIERS.
514
8f94a8c4
JJ
5152014-12-17 Jakub Jelinek <jakub@redhat.com>
516
517 PR sanitizer/64289
518 * c-convert.c: Include ubsan.h.
519 (convert): For real -> integral casts and
520 -fsanitize=float-cast-overflow don't call convert_to_integer, but
521 instead instrument the float cast directly.
522
b731b390
JJ
5232014-11-29 Jakub Jelinek <jakub@redhat.com>
524
525 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
526 c_finish_stmt_expr): Remove NULL last argument from
527 create_tmp_var_raw and create_tmp_var calls.
528 * c-array-notation.c (fix_builtin_array_notation_fn,
529 build_array_notation_expr, fix_conditional_array_notations_1,
530 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
531
541e35a6
MP
5322014-11-28 Marek Polacek <polacek@redhat.com>
533
534 PR c/63862
535 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
536 convert the right operand to integer type.
537
b286be94
MP
5382014-11-25 Marek Polacek <polacek@redhat.com>
539
540 PR c/63877
541 * c-decl.c (start_function): Disable -Wmissing-declarations warning
542 for inline functions.
543
aa7da51a
JJ
5442014-11-21 Jakub Jelinek <jakub@redhat.com>
545
546 PR target/63764
547 * c-typeck.c (build_array_ref): Adjust
548 convert_vector_to_pointer_for_subscript caller. If it returns true,
549 call non_lvalue_loc on the result.
550
d876207f
RB
5512014-11-11 Richard Biener <rguenther@suse.de>
552
553 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
554 to true.
555
e5e44252
AK
5562014-11-10 Andi Kleen <ak@linux.intel.com>
557
558 PR c/60804
559 * c-parser.c (c_parser_statement_after_labels): Call
560 check_no_cilk.
561 (c_parser_if_statement): Dito.
562 (c_parser_switch_statement): Dito.
563 (c_parser_while_statement): Dito.
564 (c_parser_do_statement): Dito.
565 (c_parser_for_statement): Dito.
566 * c-typeck.c (c_finish_loop): Dito.
567
13c21655
PC
5682014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
569
570 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
571 OPT_Wshift_count_overflow in the warnings.
572
2d51fcef
MP
5732014-10-30 Marek Polacek <polacek@redhat.com>
574
575 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
576 print the stripped version as well, if they're not the same.
577
ef4bddc2
RS
5782014-10-29 Richard Sandiford <richard.sandiford@arm.com>
579
580 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
581 machine_mode.
582
c582198b
AM
5832014-10-28 Andrew MacLeod <amacleod@redhat.com>
584
585 * c-decl.c: Adjust include files.
586 * c-parser.c: Ditto.
587
ddc8de03
PM
5882014-10-27 Phil Muldoon <pmuldoon@redhat.com>
589 Tom Tromey <tromey@redhat.com>
590
591 * c-tree.h (enum c_oracle_request): New.
592 (c_binding_oracle_function): New typedef.
593 (c_binding_oracle, c_pushtag, c_bind): Declare.
594 * c-decl.c (c_binding_oracle): New global.
595 (I_SYMBOL_CHECKED): New macro.
596 (i_symbol_binding): New function.
597 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
598 (I_TAG_CHECKED): New macro.
599 (i_tag_binding): New function.
600 (I_TAG_BINDING, I_TAG_DECL): Redefine.
601 (I_LABEL_CHECKED): New macro.
602 (i_label_binding): New function.
603 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
604 (c_print_identifier): Save and restore c_binding_oracle.
605 (c_pushtag, c_bind): New functions.
606
60393bbc
AM
6072014-10-27 Andrew MacLeod <amacleod@redhat.com>
608
609 * c-typeck.c: Adjust include files.
610
d723bb7c
MLI
6112014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
612
613 PR c++/53061
614 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
615 initialization here...
616 (c_initialize_diagnostics): ... but here. Set defaults after
617 building pretty-printer.
618
1bc5a451
MP
6192014-10-23 Marek Polacek <polacek@redhat.com>
620
621 PR c/63626
622 * c-decl.c (pop_scope): Don't print warning in external_scope.
623
4435bb92
MP
6242014-10-19 Marek Polacek <polacek@redhat.com>
625
626 PR c/63567
627 * c-typeck.c (output_init_element): Allow initializing objects with
628 static storage duration with compound literals even in C99 and add
629 pedwarn for it.
630
7278465e
MP
6312014-10-17 Marek Polacek <polacek@redhat.com>
632
633 PR c/63567
634 * c-typeck.c (digest_init): Allow initializing objects with static
635 storage duration with compound literals even in C99 and add pedwarn
636 for it.
637
d9b7be2e
MP
6382014-10-17 Marek Polacek <polacek@redhat.com>
639
640 PR c/63543
641 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
642 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
643 error multiple times. Print the type.
644
f406ae1f
MP
6452014-10-17 Marek Polacek <polacek@redhat.com>
646
647 PR c/63549
648 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
649 type.
650
92574c7c
MP
6512014-10-17 Marek Polacek <polacek@redhat.com>
652
653 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
654 (start_function): Use OPT_Wimplicit_int instead of 0.
655 (store_parm_decls_oldstyle): Likewise.
656
1bc4a978
MT
6572014-10-17 Alan Modra <amodra@gmail.com>
658
659 PR middle-end/61848
660 * c-decl.c (merge_decls): Don't merge section name or tls model
661 to newdecl symtab node, instead merge to olddecl. Override
662 existing olddecl section name. Set tls_model for all thread-local
663 vars, not just OMP thread-private ones. Remove incorrect comment.
664
83685514
AM
6652014-10-16 Andrew MacLeod <amacleod@redhat.com>
666
667 * c-decl.c: Adjust include files.
668
78a7c317
DD
6692014-10-14 DJ Delorie <dj@redhat.com>
670
671 * c-parser.c (c_parse_init): Add RID entries for each __intN.
672 (c_token_starts_typename): Check all __intN, not just __int128.
673 (c_token_starts_declspecs): Likewise.
674 (c_parser_declspecs): Likewise.
675 (c_parser_attribute_any_word): Likewise.
676 (c_parser_objc_selector): Likewise.
677 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
678 (struct c_declspecs): Add int_n_idx field to record *which* __intN
679 is specified.
680 * c-decl.c (declspecs_add_type): Check for all __intN, not just
681 __int128.
682 (finish_declspecs): Likewise.
683
74d98c1e
AB
6842014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
685
686 * c-parser.c (c_parser_all_labels): New function to replace
687 the duplicate code.
688 (c_parser_statement): Call the new function.
689
84937de2
MP
6902014-10-09 Marek Polacek <polacek@redhat.com>
691
692 PR c/63480
693 * c-typeck.c (pop_init_level): Don't warn about initializing
694 with { }.
695
0382aaa0
MP
6962014-10-07 Marek Polacek <polacek@redhat.com>
697
698 PR c/59717
699 * c-decl.c (header_for_builtin_fn): New function.
700 (implicitly_declare): Suggest which header to include.
701
7a0ca710
MP
7022014-10-07 Marek Polacek <polacek@redhat.com>
703
704 * c-convert.c (convert): Use error_operand_p.
705 * c-typeck.c (require_complete_type): Likewise.
706 (really_atomic_lvalue): Likewise.
707 (digest_init): Likewise.
708 (handle_omp_array_sections_1): Likewise.
709
6bc8a126
MP
7102014-10-03 Marek Polacek <polacek@redhat.com>
711
712 PR c/63453
713 * c-decl.c (pop_scope): Don't warn about "inline function declared
714 but never defined" for functions marked with gnu_inline attribute.
715
d90c0a59
JJ
7162014-09-25 Jakub Jelinek <jakub@redhat.com>
717
718 PR c++/63249
719 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
720 on low_bound and length.
721
083e891e
MP
7222014-09-24 Marek Polacek <polacek@redhat.com>
723
724 PR c/61405
725 PR c/53874
726 * c-parser.c: Don't define CPP_KEYWORD.
727 (c_parser_switch_statement): Pass original type to c_finish_case.
728 * c-tree.h (c_finish_case): Update declaration.
729 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
730 conditionally to c_do_switch_warnings.
731
8d95fe25
MP
7322014-09-03 Marek Polacek <polacek@redhat.com>
733
734 PR c/62024
735 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
736 conversions.
737
9a771876
JJ
7382014-09-02 Jakub Jelinek <jakub@redhat.com>
739 Balaji V. Iyer <balaji.v.iyer@intel.com>
740 Igor Zamyatin <igor.zamyatin@intel.com>
741
742 * c-parser.c (c_parser_cilk_for): New function.
743 (c_parser_cilk_grainsize): Likewise.
744 (c_get_temp_regvar): Likewise.
745 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
746 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
747 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
748 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
749 case.
750
b7679d96
CG
7512014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
752
753 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
754 with using HOST_WIDE_INT without truncation to 'int'
755
59ea0364
MP
7562014-08-22 Marek Polacek <polacek@redhat.com>
757
758 PR c++/62199
759 * c-typeck.c (parser_build_binary_op): Adjust call to
760 warn_logical_not_parentheses.
761
671a475e
IZ
7622014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
763
764 PR other/62008
765 * c-parser.c (c_parser_array_notation): Check for correct
766 type of an array added.
767
04159acf
MP
7682014-08-19 Marek Polacek <polacek@redhat.com>
769
770 PR c++/62153
771 * c-typeck.c (build_binary_op): If either operand of a comparison
772 is a boolean expression, call maybe_warn_bool_compare.
773
c77935ee
PP
7742014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
775
776 PR c/45584
777 * c-typeck.c (build_c_cast): Do a conversion even when the
778 TYPE_MAIN_VARIANTs are the same.
779
35aff4fb
MP
7802014-08-19 Marek Polacek <polacek@redhat.com>
781
782 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
783 pedwarn_c99 instead of pedwarn.
784 (grokfield): Likewise.
785 (warn_defaults_to): New function.
786 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
787 Unconditionally call pedwarn_c99 instead of pedwarn.
788 (start_function): Call warn_defaults_to instead of pedwarn_c99.
789 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
790 check flag_isoc11 before.
791 * c-errors.c (pedwarn_c99): Change the return type to bool.
792 Handle -Wc99-c11-compat.
793 * c-parser.c (disable_extension_diagnostics): Handle
794 warn_c99_c11_compat.
795 (restore_extension_diagnostics): Likewise.
796 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
797 instead of pedwarn, don't check flag_isoc11 before.
798 (c_parser_declspecs): Likewise.
799 (c_parser_alignas_specifier): Likewise.
800 (c_parser_alignof_expression): Likewise.
801 (c_parser_generic_selection): Likewise.
802 * c-tree.h (pedwarn_c99): Update declaration.
803 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
804 of pedwarn_c99.
805
177cce46
MP
8062014-08-19 Marek Polacek <polacek@redhat.com>
807
808 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
809 to pedwarn_c90.
810 * c-errors.c: Include "opts.h".
811 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
812 * c-parser.c (disable_extension_diagnostics): Handle negative value
813 of warn_c90_c99_compat, too.
814 (restore_extension_diagnostics): Likewise.
815 (c_parser_compound_statement_nostart): Pass
816 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
817
6dc99c33
MP
8182014-08-12 Marek Polacek <polacek@redhat.com>
819
820 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
821 Add pedwarn.
822 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
823 Likewise.
824 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
825
f3bede71
MP
8262014-08-10 Marek Polacek <polacek@redhat.com>
827
828 PR c/51849
829 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
830 Call pedwarn_c90 instead of pedwarn.
831 (check_bitfield_type_and_width): Likewise.
832 (declspecs_add_qual): Likewise.
833 (declspecs_add_type): Likewise.
834 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
835 Adjust to only call pedwarn_c90.
836 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
837 pedwarn_c90 instead of pedwarn.
838 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
839 * c-parser.c (disable_extension_diagnostics): Handle
840 warn_c90_c99_compat.
841 (restore_extension_diagnostics): Likewise.
842 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
843 pedwarn_c90 instead of pedwarn.
844 (c_parser_initelt): Likewise.
845 (c_parser_postfix_expression): Likewise.
846 (c_parser_postfix_expression_after_paren_type): Likewise.
847 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
848 * c-tree.h: Fix formatting.
849 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
850 pedwarn_c90 instead of pedwarn.
851
9f25a338
TS
8522014-08-07 Trevor Saunders <tsaunders@mozilla.com>
853
854 * c-typeck.c: Remove include of pointer-set.h.
855
044331a8
MP
8562014-08-07 Marek Polacek <polacek@redhat.com>
857
858 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
859
b787e7a2
TS
8602014-08-02 Trevor Saunders <tsaunders@mozilla.com>
861
862 * c-typeck.c: Use hash_map instead of pointer_map.
863
6e2830c3
TS
8642014-08-02 Trevor Saunders <tsaunders@mozilla.com>
865
866 * c-decl.c: Use hash_set instead of pointer_set.
867
a7ee52fb
IZ
8682014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
869
870 PR middle-end/61455
871 * c-array-notation.c (expand_array_notations): Handling
872 of DECL_EXPR added.
873
b4dfdc11
MG
8742014-07-31 Marc Glisse <marc.glisse@inria.fr>
875
876 PR c++/60517
877 * c-typeck.c (c_finish_return): Return 0 instead of the address of
878 a local variable.
879
976d5a22
TT
8802014-07-30 Tom Tromey <tromey@redhat.com>
881
882 * c-typeck.c (struct constructor_stack) <designator_depth>: New
883 field.
884 (really_start_incremental_init, push_init_level): Initialize
885 designator_depth.
886 (pop_init_level): Set global designator_depth.
887 (process_init_element): Check for designated_init attribute.
888
30281de2
MP
8892014-07-20 Marek Polacek <polacek@redhat.com>
890
891 PR c/61852
892 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
893 (implicitly_declare): Pass location to implicit_decl_warning.
894
b108f48f
JJ
8952014-07-14 Jakub Jelinek <jakub@redhat.com>
896
897 PR middle-end/61294
898 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
899 If non-NULL, call c_parser_check_literal_zero.
900 (c_parser_check_literal_zero): New function.
901 (c_parser_postfix_expression_after_primary): Adjust
902 c_parser_expr_list caller, handle -Wmemset-transposed-args.
903
773ec47f
MP
9042014-07-06 Marek Polacek <polacek@redhat.com>
905
906 PR c/6940
907 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
908 * c-tree.h (C_ARRAY_PARAMETER): Define.
909 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
910 function parameter.
911
22e1cf1c
JH
9122014-07-02 Jan Hubicka <hubicka@ucw.cz>
913 Chen Gang <gang.chen.5i5j@gmail.com>
914
915 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
916 releasing symbol.
917
52ec0ea3
MP
9182014-07-01 Marek Polacek <polacek@redhat.com>
919
920 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
921 instead of 0 to WARN_FOR_ASSIGNMENT.
922
d5c3d343
MP
9232014-07-01 Marek Polacek <polacek@redhat.com>
924
925 PR c/58286
926 * c-typeck.c (convert_for_assignment): Pass
927 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
928
6a7253a4
MP
9292014-06-30 Marek Polacek <polacek@redhat.com>
930
931 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
932 has no_sanitize_undefined attribute.
933
5e88a8f4
IZ
9342014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
935
936 PR middle-end/57541
937 * c-array-notation.c (fix_builtin_array_notation_fn):
938 Check for 0 arguments in builtin call. Check that bultin argument is
939 correct.
940 * c-parser.c (c_parser_array_notation): Check for incorrect initial
941 index.
942
9698b078
SH
9432014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
944
945 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
946 qualifiers in __auto_type for atomic types.
947 (c_parser_typeof_specifier): Discard all type qualifiers in
948 __typeof__ for atomic types.
949
6e07c515
MP
9502014-06-25 Marek Polacek <polacek@redhat.com>
951
952 PR c/61162
953 * c-parser.c (c_parser_statement_after_labels): Pass the location of
954 the return expression to c_finish_return.
955
da6f124d
JJ
9562014-06-25 Jakub Jelinek <jakub@redhat.com>
957
958 * c-typeck.c (c_finish_omp_clauses): Make sure
959 OMP_CLAUSE_LINEAR_STEP has correct type.
960
c203e8a7
TS
9612014-06-24 Trevor Saunders <tsaunders@mozilla.com>
962
963 * c-decl.c: Adjust.
964
56ad0e38
JJ
9652014-06-24 Jakub Jelinek <jakub@redhat.com>
966
967 * c-parser.c (c_parser_omp_for_loop): For
968 #pragma omp parallel for simd move lastprivate clause from parallel
969 to for rather than simd.
970
47c2554f
MP
9712014-06-23 Marek Polacek <polacek@redhat.com>
972
973 * c-typeck.c (parser_build_binary_op): Don't call
974 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
975
56363ffd
JH
9762014-06-15 Jan Hubicka <hubicka@ucw.cz>
977
978 * c-parser.c (c_parser_omp_threadprivate): Likewise.
979 * c-decl.c (merge_decls): Likewise.
980
d7ff7ae5
MP
9812014-06-09 Marek Polacek <polacek@redhat.com>
982
983 PR c/36446
984 * c-typeck.c (error_init): Call inform instead of error_at.
985 (pedwarn_init): Call inform instead of pedwarn.
986 (warning_init): Call inform instead of warning_at.
987
24d047a3
JH
9882014-06-07 Jan Hubicka <hubicka@ucw.cz>
989
990 * c-decl.c (merge_decls): Use set_decl_section_name.
991 (duplicate_decls): Remove node if it exists.
992
9bac5cbb
G
9932014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
994
995 PR c/53119
996 * c-typeck.c (push_init_level, process_init_element,
997 pop_init_level): Correct check for zero initialization, move
998 missing brace warning to respect zero initialization.
999
8ffcdea8
MP
10002014-06-05 Marek Polacek <polacek@redhat.com>
1001
1002 PR c/56724
1003 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
1004
742938c9
MP
10052014-06-05 Marek Polacek <polacek@redhat.com>
1006
1007 PR c/49706
1008 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
1009 on the left hand side operand of a comparison.
1010
6447c55d
MP
10112014-06-05 Marek Polacek <polacek@redhat.com>
1012
1013 PR c/48062
1014 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
1015 Print note only if the warning was printed.
1016
9dc7743c
IZ
10172014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
1018
1019 PR c/58942
1020 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
1021 with a pointer.
1022
fedfecef
MP
10232014-06-03 Marek Polacek <polacek@redhat.com>
1024
1025 PR c/60439
1026 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
1027 c_start_case.
1028 * c-tree.h (c_start_case): Update.
1029 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
1030 switch condition has boolean value.
1031
9b2b7279
AM
10322014-06-02 Andrew MacLeod <amacleod@redhat.com>
1033
1034 * c-decl.c: Include builtins.h.
1035 * c-parser.c: Likewise.
1036
5c1bc275
MP
10372014-05-27 Marek Polacek <polacek@redhat.com>
1038
1039 PR c/56724
1040 * c-typeck.c (convert_arguments): Get location of a parameter. Change
1041 error and warning calls to error_at and warning_at. Pass location of
1042 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
1043 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
1044 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
1045
97563bc8
IZ
10462014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
1047
1048 PR c/61191
1049 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
1050 function parameters.
1051
aede2c10
JH
10522014-05-23 Jan Hubicka <hubicka@ucw.cz>
1053
1054 * c-decl.c (merge_decls): Preserve symtab node pointers.
1055 (duplicate_decls): Free new decl.
1056
edbba2ce
TS
10572014-05-23 Thomas Schwinge <thomas@codesourcery.com>
1058
f3316c6d
TS
1059 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
1060 initialization.
1061
edbba2ce
TS
1062 * c-parser.c (c_parser_omp_target): Return bool values.
1063
68c81f24
TS
10642014-05-22 Thomas Schwinge <thomas@codesourcery.com>
1065
1066 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
1067 num_teams_loc variable to num_thread_limit_loc.
1068
632f2871
RS
10692014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
1070
1071 * c-array-notation.c (expand_array_notations): Use void_node
1072 instead of void_zero_node.
1073
766090c2
TS
10742014-05-17 Trevor Saunders <tsaunders@mozilla.com>
1075
1076 * c-decl.c (finish_struct): Adjust.
1077 (finish_enum): Likewise.
1078 (bind): Adjust.
1079 (record_inline_static): Likewise.
1080 (push_scope): Likewise.
1081 (make_label): Likewise.
1082 (lookup_label_for_goto): Likewise.
1083 (finish_struct): Likewise.
1084 (finish_enum): Likewise.
1085 (store_parm_decls): Likewise.
1086 (c_push_function_context): Likewise.
1087 * c-lang.h: Remove usage of variable_size gty attribute.
1088 * c-parser.c (c_parse_init): Adjust.
1089 (c_parse_file): Likewise.
1090
2b107f6b
MP
10912014-05-13 Marek Polacek <polacek@redhat.com>
1092
1093 PR c/61162
1094 * c-typeck.c (convert_for_assignment): Pass location to
1095 WARN_FOR_ASSIGNMENT instead of input_location.
1096
d033409e
MP
10972014-05-10 Marek Polacek <polacek@redhat.com>
1098
1099 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
1100 maybe_warn_string_init.
1101 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
1102 maybe_warn_string_init.
1103 * c-tree.h (maybe_warn_string_init): Update declaration.
1104 * c-typeck.c (maybe_warn_string_init): Add location parameter.
1105 Call pedwarn_init with loc instead of with input_location.
1106 (digest_init): Pass init_loc to maybe_warn_string_init.
1107 (pop_init_level): Call pedwarn_init with loc instead of with
1108 input_location.
1109 (set_init_index): Likewise.
1110 (process_init_element): Likewise.
1111
ea58ef42
MP
11122014-05-09 Marek Polacek <polacek@redhat.com>
1113
1114 PR c/61096
1115 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
1116 (c_parser_initelt): Pass location to set_init_label. Pass array index
1117 location to set_init_index.
1118 * c-tree.h (push_init_level): Update declaration.
1119 (pop_init_level): Likewise.
1120 (set_init_index): Likewise.
1121 (set_init_label): Likewise.
1122 * c-typeck.c (error_init): Add location parameter. Call error_at
1123 instead of error.
1124 (digest_init): Pass init_loc to error_init.
1125 (really_start_incremental_init):
1126 (push_init_level): Add location parameter. Pass loc to pop_init_level
1127 and error_init.
1128 (pop_init_level): Likewise.
1129 (set_designator): Add location parameter. Pass loc to pop_init_level,
1130 push_init_level, and error_init.
1131 (set_init_index): Add location parameter. Pass loc to error_init and
1132 set_designator.
1133 (set_init_label): Likewise.
1134 (output_init_element): Pass loc to error_init.
1135 (process_init_element): Pass loc to error_init, pop_init_level,
1136 pedwarn_init, and push_init_level.
1137
661a0813
MP
11382014-05-09 Marek Polacek <polacek@redhat.com>
1139
1140 PR c/50459
1141 * c-parser.c (c_parser_attributes): Parse the arguments as an
1142 expression-list if the attribute takes identifier.
1143
2793eeab
MP
11442014-05-08 Marek Polacek <polacek@redhat.com>
1145
1146 PR c/61053
1147 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
1148 TYPE_ALIGN_UNIT.
1149
f827930a
MP
11502014-05-08 Marek Polacek <polacek@redhat.com>
1151
1152 PR c/61077
1153 * c-decl.c (start_function): Warn for _Atomic-qualified return type
1154 of main.
1155
1d60af08
KZ
11562014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
1157 Mike Stump <mikestump@comcast.net>
1158 Richard Sandiford <rdsandiford@googlemail.com>
1159
1160 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
1161 (finish_enum): Use wide-int interfaces.
1162 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
1163 * c-typeck.c (build_c_cast): Likewise.
1164 (set_nonincremental_init_from_string): Likewise.
1165 (c_tree_equal): Likewise.
1166
a0e24419
MP
11672014-05-02 Marek Polacek <polacek@redhat.com>
1168
1169 PR c/25801
1170 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
1171 Return size_one_node when the type is not complete.
1172 (pointer_diff): Remove comment.
1173 (build_unary_op): Improve error messages.
1174
19fc9faa
MP
11752014-05-02 Marek Polacek <polacek@redhat.com>
1176
1177 * c-typeck.c (c_finish_return): Separate warning_at calls.
1178
63bc4e87
MP
11792014-05-02 Marek Polacek <polacek@redhat.com>
1180
1181 * c-tree.h (error_init): Remove declaration.
1182 (pedwarn_init): Likewise.
1183 * c-typeck.c (error_init): Make static and move above.
1184 (pedwarn_init): Likewise.
1185 (warning_init): Move above.
1186 (maybe_warn_string_init): Likewise.
1187
4bd2511b
JL
11882014-05-01 Jeff Law <law@redhat.com>
1189
1190 Revert:
1191
1192 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1193 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
1194 avoid goto.
1195
6a358dcb
MP
11962014-05-02 Marek Polacek <polacek@redhat.com>
1197
1198 PR c/60784
1199 * c-typeck.c (push_init_level): Set constructor_designated to
1200 p->designated for structures.
1201
ae5ebda4
MP
12022014-05-01 Marek Polacek <polacek@redhat.com>
1203
1204 PR c/60915
1205 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
1206 function-definition has an attribute after the declarator.
1207
96b40f8d
MP
12082014-05-01 Marek Polacek <polacek@redhat.com>
1209
1210 PR c/60257
1211 * c-typeck.c (warning_init): Add location_t parameter. Call
1212 warning_at instead of warning.
1213 (push_init_level): Pass input_location to warning_init.
1214 (add_pending_init): Add location_t parameter. Pass loc to
1215 warning_init.
1216 (set_nonincremental_init): Pass input_location to add_pending_init.
1217 (set_nonincremental_init_from_string): Likewise.
1218 (output_init_element): Pass loc to warning_init and to
1219 add_pending_init.
1220
32e00768
MP
12212014-05-01 Marek Polacek <polacek@redhat.com>
1222
1223 PR c/43395
1224 * c-typeck.c (c_finish_return): Distinguish between label and variable
1225 when warning about returning local address.
1226
c9379ce2
MP
12272014-05-01 Marek Polacek <polacek@redhat.com>
1228
1229 PR c/29467
1230 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
1231 in C89 mode.
1232
d00887e8
MP
12332014-05-01 Marek Polacek <polacek@redhat.com>
1234
1235 PR c/43245
1236 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
1237 instead of 0 to WARN_FOR_QUALIFIERS.
1238
5436fa2e
MP
12392014-05-01 Marek Polacek <polacek@redhat.com>
1240
1241 PR c/56989
1242 * c-typeck.c (default_conversion): Use better location for
1243 error call.
1244
f8ed5150
MP
12452014-04-30 Marek Polacek <polacek@redhat.com>
1246
1247 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
1248 also when SANITIZE_FLOAT_DIVIDE is on.
1249
8337d1db
MP
12502014-04-30 Marek Polacek <polacek@redhat.com>
1251
1252 PR c/60139
1253 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
1254 and pedwarn_init. Use loc insted of input_location.
1255
c4bdc42f
MP
12562014-04-30 Marek Polacek <polacek@redhat.com>
1257
1258 PR c/60351
1259 * c-typeck.c (build_binary_op): Use location when warning about
1260 shift count.
1261
45484dcf
MP
12622014-04-25 Marek Polacek <polacek@redhat.com>
1263
1264 PR c/18079
1265 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
1266 always_inline/noinline and hot/cold attributes.
1267
34cf811f
MP
12682014-04-25 Marek Polacek <polacek@redhat.com>
1269
1270 PR c/60114
1271 * c-parser.c (c_parser_initelt): Pass input_location to
1272 process_init_element.
1273 (c_parser_initval): Pass loc to process_init_element.
1274 * c-tree.h (process_init_element): Adjust declaration.
1275 * c-typeck.c (push_init_level): Pass input_location to
1276 process_init_element.
1277 (pop_init_level): Likewise.
1278 (set_designator): Likewise.
1279 (output_init_element): Add location_t parameter. Pass loc to
1280 digest_init.
1281 (output_pending_init_elements): Pass input_location to
1282 output_init_element.
1283 (process_init_element): Add location_t parameter. Pass loc to
1284 output_init_element.
1285
42056eac
JJ
12862014-04-24 Jakub Jelinek <jakub@redhat.com>
1287
1288 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
1289 atomic-clause, allow comma in between atomic-clause and
1290 seq_cst.
1291
e162a134
JJ
12922014-04-22 Jakub Jelinek <jakub@redhat.com>
1293
1294 PR c/59073
1295 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
1296 fails, don't set OM_PARALLEL_COMBINED and return NULL.
1297
2f6babac
IZ
12982014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
1299
1300 PR middle-end/60469
1301 * c-array-notation.c (fix_builtin_array_notation_fn): Use
1302 create_tmp_var instead build_decl for creating temps.
1303 (build_array_notation_expr): Likewise.
1304 (fix_conditional_array_notations_1): Likewise.
1305 (fix_array_notation_expr): Likewise.
1306 (fix_array_notation_call_expr): Likewise.
1307
8edbfaa6
JJ
13082014-03-28 Jakub Jelinek <jakub@redhat.com>
1309
1310 PR c++/60689
1311 * c-tree.h (c_build_function_call_vec): New prototype.
1312 * c-typeck.c (build_function_call_vec): Don't call
1313 resolve_overloaded_builtin here.
1314 (c_build_function_call_vec): New wrapper function around
1315 build_function_call_vec. Call resolve_overloaded_builtin here.
1316 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
1317 Call c_build_function_call_vec instead of build_function_call_vec.
1318 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1319 * c-decl.c (finish_decl): Likewise.
1320
7485aeea
MLI
13212014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1322
1323 PR c/55383
1324 * c-typeck.c: Use correct format string in cast-qual warning
1325
b17a8b07
TS
13262014-03-07 Thomas Schwinge <thomas@codesourcery.com>
1327
1328 * c-decl.c (c_decl_attributes): Use
1329 lang_hooks.types.omp_mappable_type.
1330 * c-typeck.c (c_finish_omp_clauses): Likewise.
1331
3af9c5e9
MP
13322014-03-06 Marek Polacek <polacek@redhat.com>
1333
1334 PR c/60197
1335 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
1336 of checking tree code.
1337
1c9f5f33
PK
13382014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1339
1340 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
1341 (c_parser_parameter_declaration): Likewise.
1342
cc28fc7f
MP
13432014-02-19 Marek Polacek <polacek@redhat.com>
1344
1345 PR c/60195
1346 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
1347 Call mark_exp_read on exp.value.
1348 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
1349 TREE_ADDRESSABLE on old instead of val.
1350 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
1351
b581c05c
PK
13522014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1353
1354 * c-parser.c (c_parser_get_builtin_args): Replace calls to
1355 C_EXPR_APPEND by vec_safe_push.
1356 * c-tree.h (C_EXPR_APPEND): Remove.
1357
81e5eca8
MP
13582014-01-31 Marek Polacek <polacek@redhat.com>
1359
1360 PR c/59963
1361 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
1362 build_function_call_vec.
1363 (build_function_call): Likewise.
1364 (build_atomic_assign): Likewise.
1365 (build_function_call_vec): Add arg_loc parameter. Use it.
1366 (convert_arguments): Likewise.
1367 (convert_for_assignment): Rename rhs_loc to expr_loc.
1368 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
1369 (c_parser_objc_keywordexpr): Likewise.
1370 (c_parser_postfix_expression_after_primary): Call
1371 build_function_call_vec with expr_loc rather than op_loc.
1372 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
1373 build_function_call_vec.
1374 (c_parser_expr_list): Add locations parameter. Fill it with locations
1375 of function arguments.
1376 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
1377
68fca595
MP
13782014-01-30 Marek Polacek <polacek@redhat.com>
1379
1380 PR c/59940
1381 * c-typeck.c (build_function_call_vec): Use loc parameter.
1382 (convert_arguments): Add location parameter. Use it.
1383 (ep_convert_and_check): Likewise.
1384 (build_atomic_assign): Adjust convert_for_assignment call.
1385 (build_modify_expr): Likewise.
1386 (digest_init): Likewise.
1387 (c_finish_return): Likewise.
1388 (build_conditional_expr): Adjust ep_convert_and_check calls.
1389 (convert_for_assignment): Add rhs_loc parameter. Use it.
1390 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
1391 calls.
1392
fa337f3a
RB
13932014-01-30 Richard Biener <rguenther@suse.de>
1394
1395 PR c/59905
1396 * c-typeck.c (build_function_call_vec): Do not replace calls
1397 to a function via an incompatible type with a runtime abort.
1398
b72271b9
BI
13992014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
1400
1401 * c-parser.c (c_parser_declaration_or_fndef): Replaced
1402 flag_enable_cilkplus with flag_cilkplus.
1403 (c_parser_direct_declarator_inner): Likewise.
1404 (c_parser_attribute_any_word): Likewise.
1405 (c_parser_attributes): Likewise.
1406 (c_parser_compound_statement): Likewise.
1407 (c_parser_statement_after_labels): Likewise.
1408 (c_parser_if_statement): Likewise.
1409 (c_parser_switch_statement): Likewise.
1410 (c_parser_do_statement): Likewise.
1411 (c_parser_for_statement): Likewise.
1412 (c_parser_unary_expression): Likewise.
1413 (c_parser_postfix_expression): Likewise.
1414 (c_parser_postfix_expression_after_primary): Likewise.
1415 (c_parser_postfix_expression_after_primary): Likewise.
1416 (c_parser_omp_clause_name): Likewise.
1417 (c_finish_omp_declare_simd): Likewise.
1418 (c_parser_cilk_verify_simd): Likewise.
1419 * c-typeck.c (build_array_ref): Likewise.
1420 (build_function_call_vec): Likewise.
1421 (convert_arguments): Likewise.
1422 (build_compound_expr): Likewise.
1423 (c_finish_return): Likewise.
1424 (c_finish_if_stmt): Likewise.
1425 (c_finish_loop): Likewise.
1426 (build_binary_op): Likewise.
1427
393e8e8b
MP
14282014-01-23 Marek Polacek <polacek@redhat.com>
1429
1430 PR c/59846
1431 * c-typeck.c (parser_build_binary_op): Use location instead of
1432 input_location.
1433 (build_binary_op): Pass location to shorten_compare.
1434
f04dda30
MP
14352014-01-23 Marek Polacek <polacek@redhat.com>
1436
1437 PR c/58346
1438 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
1439 an empty aggregate.
1440
789eadcd
MP
14412014-01-23 Marek Polacek <polacek@redhat.com>
1442
1443 PR c/59871
1444 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
1445 of a comma expression.
1446 (emit_side_effect_warnings): Likewise.
1447
40f14e9f
BI
14482014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
1449
1450 PR c/59825
1451 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
1452 function to use walk_tree and moved a lot of its functionality to
1453 expand_array_notations.
1454 (expand_array_notations): New function.
1455
74558dd9
BI
14562014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
1457
1458 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
1459 attribute an attribute without value.
1460
652fea39
JJ
14612014-01-23 Jakub Jelinek <jakub@redhat.com>
1462
1463 PR middle-end/58809
1464 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
1465 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
1466
f34f1c87
MP
14672014-01-22 Marek Polacek <polacek@redhat.com>
1468
1469 PR c/59891
1470 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
1471 of remove_c_maybe_const_expr on op1 and op2.
1472
241f845a
JJ
14732014-01-15 Jakub Jelinek <jakub@redhat.com>
1474
1475 PR c/58943
1476 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
1477 effects, preevaluate rhs using SAVE_EXPR first.
1478
9a74f20c
BI
14792014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
1480
1481 PR c++/59631
1482 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
1483 statements with if-elseif statements.
1484
96066ce1
MP
14852014-01-06 Marek Polacek <polacek@redhat.com>
1486
1487 PR c/57773
1488 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
1489 defined bit-field types only in ISO C.
1490
23a5b65a
RS
14912014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1492
1493 Update copyright years
1494
f9030485
RS
14952014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1496
1497 * c-array-notation.c: Use the standard form for the copyright notice.
1498
41958c28
BI
14992013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
1500
1501 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
1502 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
1503 field in parser is not empty. If not-empty, call the function
1504 c_parser_finish_omp_declare_simd.
1505 (c_parser_cilk_clause_vectorlength): Modified function to be shared
1506 between SIMD-enabled functions and #pragma simd. Added new parameter.
1507 (c_parser_cilk_all_clauses): Modified the usage of the function
1508 c_parser_cilk_clause_vectorlength as mentioned above.
1509 (c_parser_cilk_simd_fn_vector_attrs): New function.
1510 (c_finish_cilk_simd_fn_tokens): Likewise.
1511 (is_cilkplus_vector_p): Likewise.
1512 (c_parser_omp_clause_name): Added checking for "vectorlength,"
1513 "nomask," and "mask" strings in clause name.
1514 (c_parser_omp_all_clauses): Added 3 new case statements:
1515 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
1516 PRAGMA_CILK_CLAUSE_NOMASK.
1517 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
1518 check for vector attribute and if so call the function
1519 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
1520 called the function c_finish_cilk_simd_fn_tokens.
1521 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
1522 parser field is non-empty. If so, parse them as you would parse
1523 the omp declare simd pragma.
1524 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
1525 Added a check when step is a parameter and flag it as error.
1526 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
1527 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
1528 pragma_omp_clause.
1529
cef0fd0e
TS
15302013-12-17 Thomas Schwinge <thomas@codesourcery.com>
1531
1532 * c-parser.c (c_parser_omp_parallel): Fix description.
1533
12893402
BI
15342013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
1535
1536 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
1537 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1538 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
1539 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
1540
296674db
JM
15412013-12-04 Joseph Myers <joseph@codesourcery.com>
1542
1543 PR c/52023
1544 * c-parser.c (c_parser_alignas_specifier): Use
1545 c_sizeof_or_alignof_type instead of c_alignof.
1546 (c_parser_alignof_expression): Likewise, with min_alignof
1547 parameter depending on alignof spelling used.
1548
edd28054
MP
15492013-12-04 Marek Polacek <polacek@redhat.com>
1550
1551 PR c/54113
1552 * c-decl.c (start_function): Don't warn for missing prototype for
1553 inline functions.
1554
da0fc454
MP
15552013-12-03 Marek Polacek <polacek@redhat.com>
1556
1557 PR c/59351
1558 * c-decl.c (build_compound_literal): Allow compound literals with
1559 empty initial value.
1560
4c2ecab0
JM
15612013-12-02 Joseph Myers <joseph@codesourcery.com>
1562
1563 PR c/58235
1564 * c-typeck.c (build_modify_expr): Diagnose assignment to
1565 expression with array type.
1566
340baef7
JM
15672013-11-29 Joseph Myers <joseph@codesourcery.com>
1568
1569 PR c/42262
1570 * c-typeck.c (process_init_element): Do not treat a string as
1571 initializing a whole array when used with a designator for an
1572 individual element.
1573
6763b9f7
JM
15742013-11-29 Joseph Myers <joseph@codesourcery.com>
1575
1576 PR c/57574
1577 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
1578 an inline function following a static declaration.
1579
e7bd1de1
JJ
15802013-11-28 Jakub Jelinek <jakub@redhat.com>
1581
1582 PR c/59310
1583 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
1584 to p_name before calling c_parser_omp_teams instead of after.
1585 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
1586 argument. Remove unused p_name variable.
1587
0136f8f0
AH
15882013-11-27 Aldy Hernandez <aldyh@redhat.com>
1589 Jakub Jelinek <jakub@redhat.com>
1590
1591 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
1592 external_scope is NULL.
1593
241b71bb
TV
15942013-11-27 Tom de Vries <tom@codesourcery.com>
1595 Marc Glisse <marc.glisse@inria.fr>
1596
1597 PR c++/59032
1598 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
1599
2fb9a547
AM
16002013-11-22 Andrew MacLeod <amacleod@redhat.com>
1601
1602 * c-typeck.c: Add required include files from gimple.h.
1603
8400e75e
DM
16042013-11-22 David Malcolm <dmalcolm@redhat.com>
1605
1606 * c-decl.c (define_label, shadow_tag_warned)
1607 (check_bitfield_type_and_width, grokdeclarator, grokparms,
1608 store_parm_decls_newstyle, store_parm_decls_oldstyle)
1609 (declspecs_add_type): Remove use of in_system_header macro.
1610 * c-parser.c (c_parser_unary_expression): Likewise.
1611 * c-typeck.c (store_init_value, process_init_element)
1612 (c_start_case): Likewise.
1613
1614 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
1615 macro.
1616
1617 * c-parser.c (c_parser_set_source_position_from_token): Remove
1618 reference to in_system_header from comment.
1619
386b1f1f
RS
16202013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1621
1622 * c-decl.c (grokdeclarator): Update comment to refer to
1623 tree_to_[su]hwi rather than tree_low_cst.
1624
ae7e9ddd
RS
16252013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1626
1627 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
1628 tree_to_uhwi throughout.
1629
9439e9a1
RS
16302013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1631
1632 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
1633 throughout.
1634
9541ffee
RS
16352013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1636
1637 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
1638 throughout.
1639
c02065fc
AH
16402013-11-15 Aldy Hernandez <aldyh@redhat.com>
1641
1642 * c-parser.c (c_parser_cilk_simd): New.
1643 (c_parser_cilk_verify_simd): New.
1644 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
1645 (c_parser_omp_for_loop): Add case for NE_EXPR.
1646 Set c_break_label for CILK_SIMD.
1647 (c_parser_cilk_clause_vectorlength): New.
1648 (c_parser_cilk_clause_linear): New.
1649 (c_parser_cilk_clause_name): New.
1650 (c_parser_cilk_all_clauses): New.
1651 * c-typeck.c (build_unary_op): Pass location argument to
1652 readonly_error.
1653 (build_modify_expr): Same.
1654 (build_asm_expr): Same.
1655 (c_finish_bc_stmt): Error on break/continue in loops.
1656
18f429e2
AM
16572013-11-14 Andrew MacLeod <amacleod@redhat.com>
1658
1659 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
1660
d8a2d370
DN
16612013-11-14 Diego Novillo <dnovillo@google.com>
1662
1663 * c-decl.c: Include print-tree.h.
1664 Include stor-layout.h.
1665 Include varasm.h.
1666 Include attribs.h.
1667 Include stringpool.h.
1668 * c-lang.c: Include fold-const.h.
1669 * c-parser.c: Include stringpool.h.
1670 Include attribs.h.
1671 Include stor-layout.h.
1672 Include varasm.h.
1673 Include trans-mem.h.
1674 * c-typeck.c: Include stor-layout.h.
1675 Include trans-mem.h.
1676 Include varasm.h.
1677 Include stmt.h.
1678
38b7bc7f
JM
16792013-11-13 Joseph Myers <joseph@codesourcery.com>
1680
1681 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
1682 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
1683 __auto_type.
1684 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
1685 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
1686 RID_AUTO_TYPE.
1687 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
1688 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
1689 (c_parser_declarator, c_parser_direct_declarator_inner)
1690 (c_parser_parameter_declaration, c_parser_type_name): All callers
1691 changed.
1692 (c_parser_declaration_or_fndef): Handle declarations with type
1693 determined from the initializer.
1694
45b0be94
AM
16952013-11-12 Andrew MacLeod <amacleod@redhat.com>
1696
18f429e2 1697 * c-typeck.c: Include gimplify.h.
45b0be94 1698
582d9b50
JM
16992013-11-12 Joseph Myers <joseph@codesourcery.com>
1700
1701 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
1702 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
1703 comment.
1704 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
1705 or _Thread_local as appropriate in diagnostics.
1706 (build_null_declspecs): Initialize ret->thread_gnu_p.
1707 (declspecs_add_scspec): Handle either __thread or _Thread_local
1708 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
1709 pedantic. Do not disallow _Thread_local extern and _Thread_local
1710 static.
1711
267bac10
JM
17122013-11-07 Joseph Myers <joseph@codesourcery.com>
1713 Andrew MacLeod <amacleod@redhat.com>
1714
1715 * c-aux-info.c (gen_type): Handle atomic qualifier.
1716 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
1717 qualifiers when compating types.
1718 (shadow_tag_warned): Handle atomic_p in declspecs.
1719 (quals_from_declspecs): Likewise.
1720 (start_decl): Use c_type_promotes_to when promoting argument
1721 types.
1722 (grokdeclarator): Handle _Atomic.
1723 (get_parm_info): Diagnose any qualifier on "void" as only
1724 parameter.
1725 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
1726 comparing types. Use c_type_promotes_to when promoting argument
1727 types.
1728 (finish_function): Use c_type_promotes_to when promoting argument
1729 types.
1730 (build_null_declspecs): Handle atomic_p in declspecs.
1731 (declspecs_add_qual): Handle RID_ATOMIC.
1732 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
1733 (c_token_starts_declspecs): Handle RID_ATOMIC.
1734 (c_parser_declspecs): Handle atomic type specifiers and
1735 qualifiers.
1736 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
1737 from types of expressions with atomic type.
1738 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
1739 (c_parser_attribute_any_word): Handle RID_ATOMIC.
1740 (c_parser_initializer, c_parser_initelt, c_parser_initval)
1741 (c_parser_statement_after_labels, c_parser_switch_statement)
1742 (c_parser_for_statement, c_parser_expr_no_commas)
1743 (c_parser_conditional_expression, c_parser_binary_expression)
1744 (c_parser_cast_expression, c_parser_unary_expression)
1745 (c_parser_postfix_expression)
1746 (c_parser_postfix_expression_after_primary, c_parser_expression):
1747 Use convert_lvalue_to_rvalue.
1748 (c_parser_expression_conv, c_parser_expr_list): Document
1749 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
1750 (c_parser_objc_synchronized_statement): Use
1751 convert_lvalue_to_rvalue.
1752 (c_parser_objc_selector): Handle RID_ATOMIC.
1753 (c_parser_objc_receiver, c_parser_array_notation): Use
1754 convert_lvalue_to_rvalue.
1755 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
1756 _Atomic (type-name).
1757 (struct c_declspecs): Add atomic_p field.
1758 (convert_lvalue_to_rvalue): Declare.
1759 * c-typeck.c (c_type_promotes_to): Promote atomic types to
1760 corresponding atomic types.
1761 (qualify_type): Don't add _Atomic qualifiers from second argument.
1762 (comp_target_types): Do not allow _Atomic mismatches.
1763 (type_lists_compatible_p): Do not remove atomic qualifiers when
1764 comparing types.
1765 (really_atomic_lvalue, convert_lvalue_to_rvalue)
1766 (build_atomic_assign): New functions.
1767 (build_unary_op): Use build_atomic_assign for atomic increment and
1768 decrement.
1769 (build_conditional_expr): Do not treat _Atomic void as a qualified
1770 version of void.
1771 (build_modify_expr): Use build_atomic_assign for atomic LHS.
1772 (find_anonymous_field_with_type, convert_to_anonymous_field)
1773 (convert_for_assignment): Do not remove atomic qualifiers when
1774 comparing types.
1775 (digest_init): Do not accept initialization of arrays of atomic
1776 elements by string constants.
1777 (build_asm_expr): Use convert_lvalue_to_rvalue.
1778 (build_binary_op): Do not treat _Atomic void as a qualified
1779 version of void.
1780
0c249d4b
DD
17812013-11-06 DJ Delorie <dj@redhat.com>
1782
1783 * c-decl.c (locate_old_decl): If a previous conflicting decl is
1784 both explicit and builtin, print the location of the explicit one.
1785
6d7f7e0a
TB
17862013-11-05 Tobias Burnus <burnus@net-b.de>
1787
1788 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
1789 c_parser_omp_distribute, c_parser_omp_teams,
1790 c_parser_omp_target, c_parser_omp_declare): Handle
1791 -fopenmp-simd.
1792
b906f4ca
MP
17932013-11-03 Marek Polacek <polacek@redhat.com>
1794
1795 * c-decl.c (grokdeclarator): Add VLA instrumentation.
1796
ee1d5a02
JJ
17972013-11-01 Jakub Jelinek <jakub@redhat.com>
1798
1799 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
1800 check_dup_generic at the end, unless remove is true.
1801 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
1802 remove = true;.
1803 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
1804
5a9785fb
JJ
18052013-10-31 Jakub Jelinek <jakub@redhat.com>
1806
1807 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
1808 with decl that is not pointer nor array.
1809
939b37da
BI
18102013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
1811
1812 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
1813 a spawning function is found.
1814 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
1815 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
1816 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1817 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
1818 case.
1819 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
1820 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
1821 expr.
1822 (c_finish_return): Added a check to reject _Cilk_spawn in return
1823 expression.
1824 (build_cilk_spawn): New function.
1825 (build_cilk_sync): Likewise.
1826 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
1827
d4af74d4
TB
18282013-10-27 Tobias Burnus <burnus@net-b.de>
1829
1830 PR other/33426
1831 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
1832 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
1833 (c_parser_statement_after_labels): Update calls.
1834
d73749df 18352013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
1836
1837 PR other/33426
1838 * c-parser.c (c_parser_pragma, c_parser_for_statement):
1839 Handle PRAGMA_IVDEP.
1840 (c_parser_statement_after_labels): Update call.
1841
f28aa681
MP
18422013-10-24 Marek Polacek <polacek@redhat.com>
1843
1844 * c-parser.c (c_parser_struct_declaration): Add a comment.
1845 (c_parser_declarator): Don't allow _Alignas here.
1846
0645c1a2
AM
18472013-10-17 Andrew MacLeod <amacleod@redhat.com>
1848
1849 * c-parser.c: Include omp-low.h.
1850 * c-typeck.c: Likewise.
1851
568a31f2
MP
18522013-10-17 Marek Polacek <polacek@redhat.com>
1853
1854 PR c/58267
1855 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
1856 Document syntax of the array-declarator.
1857 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
1858 are not permitted.
1859 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
1860 (c_parser_struct_declaration): Likewise.
1861 (c_parser_declarator): Likewise.
1862 (c_parser_direct_declarator_inner): Likewise.
1863 (c_parser_parameter_declaration): Likewise.
1864 (c_parser_type_name): Likewise.
1865
acf0174b
JJ
18662013-10-11 Jakub Jelinek <jakub@redhat.com>
1867
1868 * c-lang.h (current_omp_declare_target_attribute): New extern
1869 decl.
1870 * c-parser.c: Include c-lang.h.
1871 (struct c_parser): Change tokens to c_token *.
1872 Add tokens_buf field. Change tokens_avail type to unsigned int.
1873 (c_parser_consume_token): If parser->tokens isn't
1874 &parser->tokens_buf[0], increment parser->tokens.
1875 (c_parser_consume_pragma): Likewise.
1876 (enum pragma_context): Add pragma_struct and pragma_param.
1877 (c_parser_external_declaration): Adjust
1878 c_parser_declaration_or_fndef caller.
1879 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
1880 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
1881 Adjust recursive call.
1882 (c_parser_struct_or_union_specifier): Use pragma_struct instead
1883 of pragma_external.
1884 (c_parser_parameter_declaration): Use pragma_param instead of
1885 pragma_external.
1886 (c_parser_compound_statement_nostart, c_parser_label,
1887 c_parser_for_statement): Adjust
1888 c_parser_declaration_or_fndef callers.
1889 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
1890 it through to c_parser_conditional_expression.
1891 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
1892 pass it through to c_parser_binary_expression. Adjust recursive
1893 call.
1894 (c_parser_binary_expression): Remove prec argument, add
1895 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
1896 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
1897 binop matches it, use build2 instead of parser_build_binary_op.
1898 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
1899 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
1900 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
1901 Handle pragma_struct and pragma_param the same as pragma_external.
1902 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
1903 (c_parser_omp_variable_list): Parse array sections for
1904 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
1905 (c_parser_omp_clause_collapse): Fully fold collapse expression.
1906 (c_parser_omp_clause_reduction): Handle user defined reductions.
1907 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
1908 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
1909 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
1910 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
1911 c_parser_omp_clause_depend, c_parser_omp_clause_map,
1912 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
1913 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
1914 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
1915 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
1916 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
1917 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
1918 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
1919 (c_parser_omp_for_loop): Add CODE argument, pass it through
1920 to c_finish_omp_for. Change last argument to cclauses,
1921 and adjust uses to grab parallel clauses from the array of all
1922 the split clauses. Adjust c_parser_binary_expression,
1923 c_parser_declaration_or_fndef and c_finish_omp_for callers.
1924 (omp_split_clauses): New function.
1925 (c_parser_omp_simd): New function.
1926 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
1927 Allow the function to be called also when parsing combined constructs,
1928 and call c_parser_omp_simd when parsing for simd.
1929 (c_parser_omp_sections_scope): If section-sequence doesn't start with
1930 #pragma omp section, require exactly one structured-block instead of
1931 sequence of statements.
1932 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
1933 Allow the function to be called also when parsing combined constructs.
1934 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
1935 Allow the function to be called also when parsing combined
1936 constructs.
1937 (c_parser_omp_taskgroup, c_parser_omp_cancel,
1938 c_parser_omp_cancellation_point, c_parser_omp_distribute,
1939 c_parser_omp_teams, c_parser_omp_target_data,
1940 c_parser_omp_target_update, c_parser_omp_target,
1941 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
1942 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
1943 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
1944 (c_parser_omp_construct): Add p_name and mask vars. Handle
1945 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
1946 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
1947 and c_parser_omp_sections callers.
1948 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
1949 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
1950 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
1951 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
1952 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
1953 OMP_CLAUSE_DEPEND.
1954 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
1955 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
1956 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
1957 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
1958 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
1959 * c-typeck.c: Include tree-inline.h.
1960 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
1961 handle_omp_array_sections_1, handle_omp_array_sections,
1962 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
1963 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
1964 user defined reductions.
1965 (c_tree_equal): New function.
1966 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
1967 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
1968 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
1969 c_check_omp_declare_reduction_r): New prototypes.
1970 * c-decl.c (current_omp_declare_target_attribute): New variable.
1971 (c_decl_attributes): New function.
1972 (start_decl, start_function): Use it instead of decl_attributes.
1973 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
1974 c_omp_reduction_decl, c_omp_reduction_lookup,
1975 c_check_omp_declare_reduction_r): New functions.
1976
0a6c2227
TT
19772013-09-25 Tom Tromey <tromey@redhat.com>
1978
1979 * Make-lang.in (c/gccspec.o): Remove.
1980 (CFLAGS-c/gccspec.o): New variable.
1981 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
1982 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
1983 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
1984
f3bc55f0
TT
19852013-09-25 Tom Tromey <tromey@redhat.com>
1986
1987 * Make-lang.in (c/gccspec.o): Don't use subshell.
1988
a24d975c
MP
19892013-09-18 Marek Polacek <polacek@redhat.com>
1990
1991 PR sanitize/58443
1992 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
1993 Remove unnecessary check.
1994
ce6923c5
MP
19952013-09-18 Marek Polacek <polacek@redhat.com>
1996
1997 PR sanitizer/58411
1998 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
1999 no_sanitize_undefined attribute.
2000
a1e51df9
KT
20012013-09-13 Kai Tietz <ktietz@redhat.com>
2002
2003 PR target/57848
2004 * c-decl.c (c_builtin_function_ext_scope): Remove
2005 wrong assumption that it is never called on prexisting
2006 symbol.
2007
0af94e6f
JR
20082013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
2009
2010 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
2011
20059c8b
GDR
20122013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
2013
2014 * c-objc-common.c (c_tree_printer): Tidy.
2015
de5a5fa1
MP
20162013-08-30 Marek Polacek <polacek@redhat.com>
2017
2018 * c-typeck.c (build_binary_op): Add division by zero and shift
2019 instrumentation.
2020
2531a1d9 20212013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 2022 Joseph Myers <joseph@codesourcery.com>
2531a1d9 2023
6e2bcc98 2024 PR c/35649
2531a1d9
JR
2025 * c-typeck.c (c_common_type): Prefer double_type_node over
2026 other REAL_TYPE types with the same precision.
2027 (convert_arguments): Likewise.
2028
025311c4
GDR
20292013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
2030
2031 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
2032 (c_initialize_diagnostics): Call a destructor for the early printer.
2033
da6ca2b5
GDR
20342013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
2035
2036 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
2037 printer initialization.
2038
318cda85 20392013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 2040
318cda85
BI
2041 PR c/57490
2042 * c-array-notation.c (fix_conditional_array_notations_1): Added a
2043 check for truth values.
2044 (expand_array_notation_exprs): Added truth values case. Removed an
2045 unwanted else. Added for-loop to walk through subtrees in default
2046 case.
2047
b066401f
GDR
20482013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
2049
2050 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
2051
fb48aadc
JM
20522013-07-23 Joseph Myers <joseph@codesourcery.com>
2053
2054 * c-parser.c (struct c_generic_association): Fix typo.
2055
433cc7b0
TT
20562013-07-23 Tom Tromey <tromey@redhat.com>
2057 Joseph Myers <joseph@codesourcery.com>
2058
2059 * c-parser.c (struct c_generic_association): New.
2060 (c_generic_association_d): New typedef.
2061 (c_parser_generic_selection): New function.
2062 (c_parser_postfix_expression): Handle RID_GENERIC.
2063
26d40c3d
JM
20642013-07-13 Jason Merrill <jason@redhat.com>
2065
2066 PR c++/57793
2067 * c-decl.c (finish_struct): Check for too-large class.
2068
ecdbd01a 20692013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
2070
2071 PR c/57821
2072 * c-typeck.c (set_init_index): When folding, check for index overflow.
2073
1141ed3f
BI
20742013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
2075
2076 * c-parser.c (c_parser_array_notation): Removed rejection of array
2077 notations in an array of function pointers.
2078
713b46fa
BI
20792013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
2080
2081 * c-array-notation.c (make_triplet_val_inv): New function.
2082 (create_cmp_incr): Likewise.
2083 (create_array_refs): Likewise.
2084 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
2085 Also modularized common parts between functions and called the function.
2086 (build_array_notation_expr): Likewise.
2087 (fix_conditional_array_notations_1): Likewise.
2088 (fix_array_notation_expr): Likewise.
2089 (fix_array_notation_call_expr): Likewise.
2090
92f20202
MP
20912013-06-18 Marek Polacek <polacek@redhat.com>
2092
2093 PR c/57630
2094 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
2095
73a23b06
BI
20962013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
2097
2098 * c-array-notation.c (build_array_notation_expr): Reject array notation
2099 mismatch between LHS and RHS even inside a call_expr. Also, removed
2100 a couple while statements that were dead code.
2101
00b8517d
BI
21022013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
2103
2104 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
2105 excessive precision expressions in function parameters. Also removed
2106 couple unwanted while statements.
2107
1509bdda
BI
21082013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
2109
2110 * c-array-notation.c (expand_array_notation_exprs): Added
2111 ARRAY_NOTATION_REF case.
2112
d60f1706
BI
21132013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
2114
2115 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
2116 function to c-family/array-notation-common.c.
2117 (is_cilkplus_reduce_builtin): Likewise.
2118 (find_rank): Likewise.
2119 (extract_array_notation_exprs): Likewise.
2120 (replace_array_notations): Likewise.
2121 (find_inv_trees): Likewise.
2122 (replace_inv_trees): Likewise.
2123 (contains_array_notation_expr): Likewise.
2124 (find_correct_array_notation_type): Likewise.
2125 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
2126 (struct inv_list): Moved this to c-family/array-notation-common.c.
2127 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
2128
6d6efbb3
BI
21292013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
2130
2131 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
2132 reduction functions outside the for-loop. Added a check if the fundecl
2133 is non-NULL. Finally, removed an unwanted if-statement, and made the
2134 body unconditional.
2135
25c22937
BI
21362013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
2137
2138 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
2139 condition of the if-statement matches the rank of else-block and then-
2140 block when array notations are used.
2141 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
2142 expression after the entire function body is parsed.
2143 (c_parser_expr_no_commas): Delayed creating array notation expressions
2144 to the end of function parsing.
2145 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
2146 whole if-statement instead of just the condition.
2147 (expand_array_notation_exprs): Added MODIFY_EXPR case.
2148
edd25645
BI
21492013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
2150
2151 PR c/57474
2152 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
2153 array to NULL_TREE if they are unused. Also added a check for the
2154 field to be NULL before its fields are used in future.
2155
065ce7f1
RO
21562013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2157
2158 PR bootstrap/57450
2159 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
2160 (build_array_notation_expr): Likewise.
2161
36536d79
BI
21622013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
2163
2164 * c-typeck.c (build_array_ref): Added a check to see if array's
2165 index is greater than one. If true, then emit an error.
2166 (build_function_call_vec): Exclude error reporting and checking
2167 for builtin array-notation functions.
2168 (convert_arguments): Likewise.
2169 (c_finish_return): Added a check for array notations as a return
2170 expression. If true, then emit an error.
2171 (c_finish_loop): Added a check for array notations in a loop
2172 condition. If true then emit an error.
2173 (lvalue_p): Added a ARRAY_NOTATION_REF case.
2174 (build_binary_op): Added a check for array notation expr inside
2175 op1 and op0. If present, we call another function to find correct
2176 type.
2177 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
2178 * c-parser.c (c_parser_compound_statement): Check if array
2179 notation code is used in tree, if so, then transform them into
2180 appropriate C code.
2181 (c_parser_expr_no_commas): Check if array notation is used in LHS
2182 or RHS, if so, then build array notation expression instead of
2183 regular modify.
2184 (c_parser_postfix_expression_after_primary): Added a check for
2185 colon(s) after square braces, if so then handle it like an array
2186 notation. Also, break up array notations in unary op if found.
2187 (c_parser_direct_declarator_inner): Added a check for array
2188 notation.
2189 (c_parser_compound_statement): Added a check for array notation in
2190 a stmt. If one is present, then expand array notation expr.
2191 (c_parser_if_statement): Likewise.
2192 (c_parser_switch_statement): Added a check for array notations in
2193 a switch statement's condition. If true, then output an error.
2194 (c_parser_while_statement): Similarly, but for a while.
2195 (c_parser_do_statement): Similarly, but for a do-while.
2196 (c_parser_for_statement): Similarly, but for a for-loop.
2197 (c_parser_unary_expression): Check if array notation is used in a
2198 pre-increment or pre-decrement expression. If true, then expand
2199 them.
2200 (c_parser_array_notation): New function.
2201 * c-array-notation.c: New file.
2202 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
2203
cd192ccc
MS
22042013-05-23 Mike Stump <mikestump@comcast.net>
2205
2206 * c-typeck.c (convert_for_assignment): Handle references to memory
2207 spaces better.
2208
427b248d
JM
22092013-05-16 Jason Merrill <jason@redhat.com>
2210
2211 * Make-lang.in (cc1$(exeext)): Use link mutex.
2212
44d90fe1
PC
22132013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
2214
2215 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
2216 to simply use OPT_Wpointer_arith.
2217 (build_unary_op): Likewise.
2218
4e7d7b3d
JJ
22192013-04-03 Jakub Jelinek <jakub@redhat.com>
2220
2221 PR c/19449
2222 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
2223 argument. If set, or it temporarily for parsing of the first
2224 argument into force_folding_builtin_constant_p.
2225 (c_parser_postfix_expression): Adjust callers.
2226
839b422f
RB
22272013-03-21 Richard Biener <rguenther@suse.de>
2228
2229 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
2230 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
2231
2ee028f1
MP
22322013-02-12 Marek Polacek <polacek@redhat.com>
2233
2234 PR c/44938
2235 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
2236 origtypes to NULL.
2237
8824edff
JJ
22382013-01-24 Jakub Jelinek <jakub@redhat.com>
2239
2240 PR c/56078
2241 * c-typeck.c (set_nonincremental_init_from_string): If
2242 constructor_max_index is NULL, treat it as if tree_int_cst_lt
2243 returned false.
2244 (process_init_element): Likewise.
2245
eadd3d0d
JJ
22462012-12-20 Jakub Jelinek <jakub@redhat.com>
2247
2248 PR c++/55619
2249 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
2250 argument, don't call default_function_array_conversion
2251 nor c_fully_fold here.
2252 (c_parser_asm_statement): Adjust callers.
2253 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
2254 and outputs here, and call default_function_array_conversion
2255 on inputs that don't need to be addressable.
2256
f8a93a2e
JJ
22572012-12-18 Jakub Jelinek <jakub@redhat.com>
2258
2259 PR c/39464
2260 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
2261 warning require that both c_common_unsigned_type as well as
2262 c_common_signed_type is the same for both mvl and mvr types.
2263
9771b263
DN
22642012-11-16 Diego Novillo <dnovillo@google.com>
2265
2266 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
2267
2268 * c-common.c: Use new vec API in vec.h.
2269 * c-common.h: Likewise.
2270 * c-gimplify.c: Likewise.
2271 * c-pragma.c: Likewise.
2272 * c-pretty-print.c: Likewise.
2273 * c-pretty-print.h: Likewise.
2274 * c-semantics.c: Likewise.
2275 * c-decl.c: Likewise.
2276 * c-parser.c: Likewise.
2277 * c-tree.h: Likewise.
2278 * c-typeck.c: Likewise.
2279
880661a4
JW
22802012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
2281
2282 PR c++/54930
2283 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
2284
077d1abe
MLI
22852012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2286
2287 PR c/53066
2288 * c-decl.c (warn_if_shadowing): Do not warn if a variable
2289 shadows a function, unless the variable is a function or a
2290 pointer-to-function.
2291
3a785c97
JJ
22922012-10-12 Jakub Jelinek <jakub@redhat.com>
2293
2294 PR c/54381
2295 * c-parser.c (struct c_tree_loc_pair): Removed.
2296 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
2297 add location_t * and tree * arguments, fill in array of 3
2298 sizeof_arg trees and corresponding locs.
2299 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
2300 c_parser_expr_list callers.
2301 (c_parser_postfix_expression_after_primary): Likewise. Pass
2302 array of 3 sizeof_arg trees and locs (corresponding to first
2303 3 arguments) to sizeof_pointer_memaccess_warning.
2304
703c8606
LC
23052012-10-09 Lawrence Crowl <crowl@google.com>
2306
2307 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
2308 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
2309 hash table.
2310
5d9de0d0
PC
23112012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
2312
2313 PR c++/54194
2314 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
2315 call.
2316
a212e43f
MG
23172012-10-09 Marc Glisse <marc.glisse@inria.fr>
2318
2319 PR c++/54427
2320 * c-typeck.c: Include c-common.h.
2321 (enum stv_conv): Moved to c-common.h.
2322 (scalar_to_vector): Moved to c-common.c.
2323 (build_binary_op): Adapt to scalar_to_vector's new prototype.
2324 * Make-lang.in: c-typeck.c depends on c-common.h.
2325
3b78de56
AC
23262012-10-04 Arnaud Charlet <charlet@adacore.com>
2327
2328 * c-decl.c (c_write_global_declarations): Fix handling of
2329 -fdump-ada-spec*.
2330
78c60e3d
SS
23312012-09-30 Sharad Singhai <singhai@google.com>
2332
2333 * c-decl.c (c_write_global_declarations): Use a different method
2334 to determine if the dump has ben initialized.
2335
9f33203d
JM
23362012-09-14 Joseph Myers <joseph@codesourcery.com>
2337
2338 PR c/54552
2339 * c-typeck.c (c_cast_expr): When casting to a type requiring
2340 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
2341 c_fully_fold first.
2342
a27d595d
JM
23432012-09-14 Joseph Myers <joseph@codesourcery.com>
2344
2345 PR c/54103
2346 * c-typeck.c (build_unary_op): Pass original argument of
2347 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
2348 any C_MAYBE_CONST_EXPR, if it has integer operands.
2349 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
2350 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
2351 to c_objc_common_truthvalue_conversion, then remove any
2352 C_MAYBE_CONST_EXPR, if they have integer operands. Use
2353 c_objc_common_truthvalue_conversion not
2354 c_common_truthvalue_conversion.
2355 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
2356 call note_integer_operands for arguments with integer operands
2357 that are not integer constants.
2358
9feb29df
JJ
23592012-09-13 Jakub Jelinek <jakub@redhat.com>
2360
2361 PR c/54559
2362 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
2363 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
2364
d409320c
JJ
23652012-08-31 Jakub Jelinek <jakub@redhat.com>
2366
2367 PR c/54428
2368 * c-convert.c (convert): Don't call fold_convert_loc if
2369 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
2370 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
2371 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
2372
6265d07c
JJ
23732012-08-24 Jakub Jelinek <jakub@redhat.com>
2374
2375 PR c/54355
2376 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
2377 for nested and empty_ok arguments in the call to
2378 c_parser_declaration_or_fndef.
2379
1a4049e7
JJ
23802012-08-17 Jakub Jelinek <jakub@redhat.com>
2381
2382 * c-tree.h (c_last_sizeof_arg): Declare.
2383 * c-parser.c (struct c_tree_loc_pair): New type.
2384 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
2385 non-NULL.
2386 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
2387 (c_parser_postfix_expression_after_primary): Likewise. Call
2388 sizeof_pointer_memaccess_warning if needed.
2389 (sizeof_ptr_memacc_comptypes): New function.
2390 * c-typeck.c (c_last_sizeof_arg): New global variable.
2391 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
2392
0229aee9
UB
23932012-07-24 Uros Bizjak <ubizjak@gmail.com>
2394
2395 * c-lang.h (lang_decl): Add variable_size GTY option.
2396
7ee2468b
SB
23972012-07-16 Steven Bosscher <steven@gcc.gnu.org>
2398
2399 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
2400 * Make-lang.in: Fix dependencies.
2401
d4a10d0a
SB
24022012-06-29 Steven Bosscher <steven@gcc.gnu.org>
2403
2404 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
2405 and add language Makefile hooks.
2406 * config-lang.in: New file.
2407 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
2408 add the required "normal" config-lang.in rules.
2409 * c-lang.h: Moved from gcc/ to here.
2410 * c-tree.h: Likewise.
2411 * c-objc-common.c: Likewise.
2412 * c-objc-common.h: Likewise.
2413 * c-typeck.c: Likewise.
2414 * c-convert.c: Likewise.
2415 * c-lang.c: Likewise.
2416 * c-aux-info.c: Likewise.
2417 * c-errors.c: Likewise.
2418 * gccspec.c: Likewise.
2419 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
2420 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
2421\f
5624e564 2422Copyright (C) 2012-2015 Free Software Foundation, Inc.
d4a10d0a
SB
2423
2424Copying and distribution of this file, with or without modification,
2425are permitted in any medium without royalty provided the copyright
2426notice and this notice are preserved.
This page took 1.068872 seconds and 5 git commands to generate.